in reply to subroutine for calculating day since 1900 needed

That should be fairly easy, since there are always going to be 365 or 366 days in any year between 1900 and the present.  Besides which, the algorithms for calculating whether a year is a leap year or not is trivial.

Have you thought about just writing your own subroutine to do it?


s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/
  • Comment on Re: subroutine for calculating day since 1900 needed

Replies are listed 'Best First'.
Re^2: subroutine for calculating day since 1900 needed
by Ninthwave (Chaplain) on May 12, 2006 at 18:11 UTC
    You have to keep in mind that 2000 was a non leap year leap year to account for the 4 century drift as the year is 365.24 and the leap years system drifts .1 every leap year so every 4 centuries you skip a leap year. Except if it is divisible by 4. http://tf.nist.gov/general/leaps.htm
    "No matter where you go, there you are." BB
      Sorry that 2000 was a leap year not a non leap year
      "No matter where you go, there you are." BB