in reply to subroutine for calculating day since 1900 needed

DateTime and Date::Calc are both good solutions.

Alternately, you could just precalculate the number of days in each year into an array (with 1900 in index 0, 1901 in index 1), then convert the month/day into number of days since Jan 1st of the current year. Of course, that assumes you know how to calculate the number of days in a year. You do know how to do that, right?


My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
  • Comment on Re: subroutine for calculating day since 1900 needed