On Tue, 10 Feb 2004, Matt Sisk wrote:
> I understand why you have to deal with the ambiguity, but I still really
> wish there were an easer way to get a rough shot at this value when
> absolute precision is not required.
The problem is I'd like to be able to get the number of seconds a duration
represents when it's not an abstract duration, i.e. when the length of all
the days was originally known.
use DateTime;
my $london_pm_social = DateTime->new(
hour => 19,
day => 4,
month => 3,
year => 2004,
);
my $now = DateTime->now();
my $diff = $social-$now;
print $diff->total_seconds; # or some other method name
Mark.
--
#!/usr/bin/perl -T
use strict;
use warnings;
print q{Mark Fowler, [EMAIL PROTECTED], http://twoshortplanks.com/};