Odd date calc on 20b « Next Oldest | Next Newest »

 ▼ Darin Murphy Junior Member Posts: 9 Threads: 5 Joined: May 2008 08-08-2008, 06:43 PM While playing with my new 20b, I noticed something odd about the days between dates calculation. Try this and see what you get: Date 1: 6.252003 Date 2: 12.312010 Actual days: 2746 Now switch to cal 360 and evaluate: -721,255 is what it shows on mine. However, on both the 17BII+silver and 12c 25th ann. ed. the same calculations give these answers: 17BII+: Acutal days 2746 360 days 2706 12c: 2746 after pressing x<>y swap button it gives 2706 ▼ cyrille de Brébisson Member Posts: 193 Threads: 10 Joined: Mar 2008 08-08-2008, 11:10 PM Hello, so, do you know how they handle the 'day index' for a 'bad' date for the 360 calendar but a good date for the actual calendar (the only way it can happen is for the 31th of a month)... it looks like they just take the 'day index' for day 30 of that month and then add 1... can yo confirm? cyrille ▼ Darin Murphy Junior Member Posts: 9 Threads: 5 Joined: May 2008 08-09-2008, 11:06 AM Yes I believe that is what happens. When using 12/30 for 30 day calendar it returns 2,705. What does the 20b do instead when switching from actual to cal 360? ▼ cyrille de Brébisson Member Posts: 193 Threads: 10 Joined: Mar 2008 08-09-2008, 05:13 PM hello, Quote: Yes I believe that is what happens. When using 12/30 for 30 day calendar it returns 2,705. What does the 20b do instead when switching from actual to cal 360? all calculations on dates are done in 360 mode, it creates a numerical index from the date using the following formula: 360*year+30*(month-1)+day-1. when a date is invalid, it returns -1 or 0xffffffff. since the day between function is baddly codded and does not check the return validity, it will return index from date 1 - 0xffffff therefore the change result. cyrille Katie Wasserman Posting Freak Posts: 1,477 Threads: 71 Joined: Jan 2005 08-09-2008, 12:44 PM Quote: so, do you know how they handle the 'day index' for a 'bad' date for the 360 calendar but a good date for the actual calendar (the only way it can happen is for the 31th of a month)... All you need to do is look at the appendix of the 12C manual, all the date calculation arithmetic is there. Edited: 9 Aug 2008, 12:47 p.m.

 Possibly Related Threads... Thread Author Replies Views Last Post Prime: how to detect date format giancarlo 1 498 12-02-2013, 11:21 AM Last Post: Michael de Estrada Date/time formats R. Pienne 4 722 11-01-2013, 12:43 PM Last Post: Marcus von Cube, Germany How to set the Date.Time etc on a WP34S Harold A Climer 4 697 10-29-2013, 09:32 PM Last Post: FORTIN Pascal Date/time programs for the HP 35s R. Pienne 0 351 10-03-2013, 02:37 PM Last Post: R. Pienne HP's thinking behind the 20b/30b? John Ioannidis 3 539 09-07-2013, 10:21 AM Last Post: Tim Wessman wp34s calc to calc communication Andrew Nikitin 1 429 07-29-2013, 01:57 AM Last Post: Marcus von Cube, Germany 20b, 30b not in HP's web store Eric Smith 3 548 02-08-2013, 11:52 AM Last Post: Walter B Date & Time disappear on WP 34S René Franquinet 16 1,716 12-10-2012, 08:24 AM Last Post: Walter B A non 20b/30b 34S Matt Agajanian 22 1,680 08-20-2012, 01:06 AM Last Post: Reth A little OT: Blank date fields in 200LX database Dave Britten 1 430 07-12-2012, 06:11 PM Last Post: Dave Britten

Forum Jump: