HP48 Sources Page.


Given a date it returns the day of week as a real (monday=1).


date -> day of week
 
Size: 31 Checksum: # 2C2Dh
::
 CK1NoBlame			(check for one argument)
 CKREAL				(must be a real)
CODE
	GOSBVL	=POPDATE%	pop the number into C[W], error if invalid date, does SETDEC and saves pointer
	SETHEX			we need hexmode
	GOSBVL	=YMD>Ticks	convert date into ticks
	GOSBVL	=dowutil	calculate day of week, does SETDEC
	SETHEX			need hexmode again
	GOVLNG	=PUSH#ALOOP	push A[A] and restore pointers, exit back to rpl
ENDCODE
 UNCOERCE			(convert internal "bint" to real)
;