doubledecker has asked for the wisdom of the Perl Monks concerning the following question:
Monks..
I'm trying to find out remaining difference of the day in hours, but not sure of how to proceed further. Here is what I've tried so far...
#!/usr/bin/perl use strict; use DateTime; my $start = '2013/01/08 09:26:07'; my $end = '2013/04/11 20:19:12'; my @start_list = split /[ :\/]/, $start; my @end_list = split /[ :\/]/, $end; my %start; @start{qw[year month day hour minute second]} = @start_list; my %end; @end{qw[year month day hour minute second]} = @end_list; my $start = DateTime->new(%start); my $end = DateTime->new(%end);
I want to get remaining hours left for start date and total hours elapsed for end date. any help is appreciated
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: get remaining hours
by Kenosis (Priest) on May 06, 2013 at 06:17 UTC | |
|
Re: get remaining hours
by locked_user sundialsvc4 (Abbot) on May 06, 2013 at 13:48 UTC | |
|
Re: get remaining hours
by Anonymous Monk on May 06, 2013 at 07:06 UTC |