in reply to How do I find the difference in days between two dates, in a cool perl way?

perl -MDate::Parse -le 'print+(str2time(pop) - str2time(pop)) / 86400' + 2016-02-28 2016-03-01 2
Note, however, that it seems not to work for dates before January 1st 1967. At least, not with Date::Parse version 2.30, which is the version I have.

Update: this seems to be a long-known bug: rt://105031; rt://84075 gives a little more info as well.

  • Comment on Re: How do I find the difference in days between two dates, in a cool perl way?
  • Download Code