in reply to Re: List of days in current month
in thread List of days in current month

Not every day has 86400 seconds.

Replies are listed 'Best First'.
Re^3: List of days in current month
by Lennotoecom (Pilgrim) on Mar 14, 2014 at 15:06 UTC
    Which ones dont?
      #!/usr/bin/perl use warnings; use strict; use DateTime; my $dt = 'DateTime'->new( year => 2014, month => 3, day => 14, hour => 0, minute => 0, second => 0, time_zone => 'America/New_York', ); while (1) { my $yesterday = $dt->clone; $yesterday->subtract(days => 1); my $diff = $dt->epoch - $yesterday->epoch; $dt = $yesterday; print "$dt\t$diff\n"; last if $diff != 60 * 60 * 24; }
      لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
        got it thank you
      In the US, we just lost an hour this last weekend due to going off Daylight Savings Time. In the UK, they're doing it later this month. All so some guy could get more tee time...
        ty for explanation