Forums before death by AOL, social media and spammers... "We can't have nice things"
|    alt.msdos.batch.nt    |    Fun with Windows NT batch files    |    68,980 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 67,509 of 68,980    |
|    dr.j.r.stockton@gmail.com to All    |
|    Re: Batch Script Yesterday date file for    |
|    18 Mar 20 09:12:23    |
      On Wednesday, 18 March 2020 14:06:50 UTC, Zaidy036 wrote:              > SET /A        > JDate=1461*(%Year1%+%Month1%)/4+367*(%MM%-2-12*%Month1%)/12-(3       ((%Year1%+%Month1%+100)/100))/4+%DD%-32075                     Date algorithms written in the 20th century and containing integer division or       modulo operations may perhaps fail after the year 1999, if the arguments of       such operations then unexpectedly become negative. A little over 20 years       ago, I spotted one such        trying to make its way into an Internet News and/or Mail standard, and pointed       out the imminent problem to the unsuspecting author - who expressed due       gratitude.              The one you quote may well be perfectly OK; but I advise testing all such       algorithms for all dates that they might be used for, AND for at least 400       full years.              I once found a browser in the last Windows version of which there appeared to       be a 3 where a 4 should be somewhere in its JavaScript leap-year rules. It       would have worked well for current dates until about AD 2033.              --         (c) John Stockton, near London, UK. Using Google Groups. |        Mail: J.R.""""""""@physics.org - or as Reply-To, if any. |              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca