Re: Date question
This WebDNA talk-list message is from 2003
It keeps the original formatting.
numero = 53292
interpreted = N
texte = Your leap year calculation isn't right. I'm not familiar with the 11 missing days for the Gregorian Reformation so those are not be part of the calculation. Frankly, I've never seen a date calculator (common one) that had the 11 days whacked (I might be wrong, it's been a long time since I did this). Here's how it works:2003 x 365 - base days up to 2003+ 280 days - days from jan 1+ floor(2003/4) - leap days since start (partial calc)- floor(2003/100) - subtract leap day at century markers (partial calc)+ floor(2003/400) - add leap day at century if multiple of 400>Hi!>>I'm trying to implement an timestamp function and have a question. What does the numerical result of [math]{[date]}[/math] represent? On my US Mac with a date of 10/07/2003, I get 731860. This is almost the number of days since year 01/01/0000, but not quite....>>Regular Year: 731860/365=2005.096>Including Leap Years: 731860/365.25=2003.723>Including Leap Years and 11 days missing due to the Gregorian Reformation (731860+11)/365.25=203.754>>Oct. 7, 2003 is the 280th day of the year: 280/365.25=0.7665982>>Thanks,>>Andy>>>------------------------------------------------------------->This message is sent to you because you are subscribed to> the mailing list
.>To unsubscribe, E-mail to: >To switch to the DIGEST mode, E-mail to >Web Archive of this list is at: http://webdna.smithmicro.com/-- --------------------------------- John A. Hill Oak Hill SoftwareWebsite Development/Consulting john@oakhillsoftware.com-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
Your leap year calculation isn't right. I'm not familiar with the 11 missing days for the Gregorian Reformation so those are not be part of the calculation. Frankly, I've never seen a date calculator (common one) that had the 11 days whacked (I might be wrong, it's been a long time since I did this). Here's how it works:2003 x 365 - base days up to 2003+ 280 days - days from jan 1+ floor(2003/4) - leap days since start (partial calc)- floor(2003/100) - subtract leap day at century markers (partial calc)+ floor(2003/400) - add leap day at century if multiple of 400>Hi!>>I'm trying to implement an timestamp function and have a question. What does the numerical result of [math]{[date]}[/math] represent? On my US Mac with a date of 10/07/2003, I get 731860. This is almost the number of days since year 01/01/0000, but not quite....>>Regular Year: 731860/365=2005.096>Including Leap Years: 731860/365.25=2003.723>Including Leap Years and 11 days missing due to the Gregorian Reformation (731860+11)/365.25=203.754>>Oct. 7, 2003 is the 280th day of the year: 280/365.25=0.7665982>>Thanks,>>Andy>>>------------------------------------------------------------->This message is sent to you because you are subscribed to> the mailing list .>To unsubscribe, E-mail to: >To switch to the DIGEST mode, E-mail to >Web Archive of this list is at: http://webdna.smithmicro.com/-- --------------------------------- John A. Hill Oak Hill SoftwareWebsite Development/Consulting john@oakhillsoftware.com-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
John Hill
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
Multiple adding (1997)
E-mail loop ! (1997)
[ot] Authorize.Net Resellers (2006)
Reversed words (1997)
Appending Information from one db to another (1998)
unable to launch acgi in WebCat (1997)
no serial? (1998)
all db's in one folder and protected (1998)
More than one db with the same namn (was: WC2f3) (1997)
WebCat2b14MacPlugIn - [include] doesn't hide the search string (1997)
CAPTCHA (2006)
RAM variables (1997)
Which GUI HTML editors work with WC ? (1997)
PROBLEMS WITH PROTECT TAG (2004)
[Reload mydata.db] (1998)
Include files (1998)
RE: Search (1997)
Upgrading old WebCat Database Files (1997)
redirect not passing vars (2004)
SKU lookup (1997)