Deltadays and date functions.
|
05-10-2017, 01:28 PM
(This post was last modified: 05-10-2017 02:14 PM by Vtile.)
Post: #1
|
|||
|
|||
Deltadays and date functions.
I have been in seach of simple algorithm to calculate dDays between two dates.
The JDN method is too heavy to my use (DM15/HP15C) as it needs to be accurate only between about 100 year time window. I did found one that suits my use at: https://groups.google.com/forum/#!topic/...c9rcvY7d2s Now interesting enough I did put 3 different methods to the excel worksheet to compare them simultaneusly.. If I take DDays from 28.2.1900 and 28.2.2100 I get results: Excel (365): 73050 JDN-JDN^^: 73049 HP50g DDAYS: 73049 SIMPLE DDAYS**: 73050 WAlpha: 73049 ( https://www.wolframalpha.com/input/?i=DA...+28.2.2100 ) PS. As late though So which ones are correct? :/ Any idea.. I trush 50g more than excel, since also the JDN-JDN gives the same result but.. First I though that excel handles days as Ddays+1, but no it were false assumption since DDAYS(28.3.1900,28.2.2100) returns as follows: Excel: 73021 JDN-JDN: 73021 HP50g DDAYS: 73021 Simple DDAYS: 73020 EDIT2: Ahaa, Excel DAYS function starts at year 1900 that might explain this difference in this particular case. Interesting.. Back to jellyfying my brains with day algorithms. :Z ** From mailinglist discussion Y <- start year M <- start month D <- start day Y <- Y-1 M <- M+13 X <- int(365.25*Y)+int(30.6*M)+D https://groups.google.com/forum/#!topic/...c9rcvY7d2s ^^ As given in wikipedia.org https://en.wikipedia.org/wiki/Julian_day https://wikimedia.org/api/rest_v1/media/...0958a53d61 |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 14 Guest(s)