BEGIN { package DateTime::Format::Epoch::Excel; use DateTime qw( ); use DateTime::Format::Epoch qw( ); our @ISA = 'DateTime::Format::Epoch'; my $epoch = DateTime ->new( year => 1900, month => 1, day => 1 ) ->subtract( days => 2 ); # Incorrect for days before March 1st, 1900 # due to 1900 being treated as a leap year. sub new { my ($class) = @_; return $class->SUPER::new( epoch => $epoch, unit => 1/86400, type => 'float', skip_leap_seconds => 1 ); } } print( DateTime::Format::Epoch::Excel->parse_datetime( 39749 )->ymd(), "\n" );