RE: I'd tell you how long it'll take for my hair to fall out but I'm struggling with duration!

[email protected] ("Kristian Flint")
Newsgroups perl.datetime
Message-ID <[email protected]>
 
> this seems to do what you wanted?
> 
>      my $dt1 = DateTime->new(
>          year   => 2008,
>          month  => 10,
>          day    => 2,
>      );
> 
>      my $dt2 = DateTime->new(
>          year   => 2008,
>          month  => 10,
>          day    => 5,
>      );
> 
>      my $diff = $dt2 - $dt1;
>      print $diff->delta_days, "\n";
> 
> --d
> 

Thanks to everyone for their reply, I'm quite pleased I wasn't being
_too_ much of a moron and that it's set off an interesting insight into
leap seconds. I knew there'd be a much easier way of doing it. 

> > Have I missed something?! I'm thinking there's probably a _much_ 
> > easier way of getting what I want and it's just passed by 
> my small boy brain.

Special thanks to Daisuke for the pointer.

Kristian
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.