in reply to I can't subtract one DateTime object from another to get a DateTime::Duration in days

From memory, DateTime is a bit limited in that regard. You can use Date::Manip for complex date math.

A long, long time ago (in a galaxy unfortunately not far enough away), i wrote "Custom date calculations using Date::Manip", see 11109316

perl -e 'use Crypt::Digest::SHA256 qw[sha256_hex]; print substr(sha256_hex("the Answer To Life, The Universe And Everything"), 6, 2), "\n";'
  • Comment on Re: I can't subtract one DateTime object from another to get a DateTime::Duration in days
  • Download Code