Post Reply 
DAYOFWEEK command
08-26-2015, 02:51 PM
Post: #14
RE: DAYOFWEEK command
(08-26-2015 10:43 AM)matthiaspaul Wrote:  Like you, I think it is good as it is, except for that most day-of-week functions I have seen implemented in libraries or shells elsewhere return 1 = Sunday rather than 1 = Monday (or even 0 = Sunday), so the results may be unexpected to some. I have also seen two sets of functions being implemented to avoid this, like in DOW (for 1 = Sunday) and ISODOW (for 1 = Monday) etc., perhaps still an option for the Prime as well...

Needless to say (but that never stopped me before), Prime's DAYOFWEEK output can be made to agree with HP's financial calculators which use 0 for Sunday (ISODOW) by simply appending "MOD 7" after the DAYOFWEEK. Example: DAYOFWEEK(1955.0821) MOD 7 returns 0, because 21 August 1955 was a Sunday.

<0|ΙΈ|0>
-Joe-
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
DAYOFWEEK command - Giancarlo - 08-22-2015, 05:24 PM
RE: DAYOFWEEK command - Thomas_Sch - 08-22-2015, 08:05 PM
RE: DAYOFWEEK command - TASP - 08-22-2015, 09:31 PM
RE: DAYOFWEEK command - Thomas_Sch - 08-22-2015, 10:07 PM
RE: DAYOFWEEK command - TASP - 08-22-2015, 10:49 PM
RE: DAYOFWEEK command - Thomas_Sch - 08-23-2015, 06:39 AM
RE: DAYOFWEEK command - TASP - 08-27-2015, 03:57 AM
RE: DAYOFWEEK command - Gerald H - 08-23-2015, 06:36 AM
RE: DAYOFWEEK command - Thomas_Sch - 08-23-2015, 06:45 AM
RE: DAYOFWEEK command - Giancarlo - 08-23-2015, 10:48 AM
RE: DAYOFWEEK command - matthiaspaul - 08-26-2015, 03:10 AM
RE: DAYOFWEEK command - Joe Horn - 08-26-2015, 05:56 AM
RE: DAYOFWEEK command - Giancarlo - 08-26-2015, 08:36 AM
RE: DAYOFWEEK command - matthiaspaul - 08-26-2015, 10:43 AM
RE: DAYOFWEEK command - Joe Horn - 08-26-2015 02:51 PM



User(s) browsing this thread: 1 Guest(s)