DTFormat

Syntax

DTformat require two items from stack, a date and a format.
it returns a string of the formated date.

Date

The first argument is a date, you can take any kind of date you want (julian day, gregorian, proleptic...)

Format list

The second argument is a string that describe the requested format.
format string result example
c day number of the date week " 04 05 06 07 08 09 10 "
t same as c, with marked current day " 04 05 [06] 07 08 09 10 "
w constant string : name of day " Mo. Tu. We. Th. Fr. Sa. Su. "
n same as w, with week number " Mo. Tu. We. Th. Fr. Sa. Su. |w8"
d current day name "Monday"
m current month name "March"
M current month name with year "March 2004"
e day/month/year "11/03/2004"
h hour:min:sec "15:22:00"
j corresponding Julian Day "2453075.5"
J corresponding Modified Julian Day "53075"

Combined format string

You can combine serveral format string at once.
example <GR 2004𣇼9> "Mwt" DTFormat return the following string :
"February  2004
 Mo. Tu. We. Th. Fr. Sa. Su. 
 23  24  25  26  27  28 [29]"
This is a string with 3 lines (one for each format : "M", "w" and "t").

Examples

run Date, type "t", run DTFormat to get the week string, example " 04 05 [06] 07 08 09 10 "
run Date, type "e", run DTFormat to get date formated as used in some country (day/month/year), like "31/12/2003"


Advanced Example

You can build a program that display calandar, example
« CLLCD
Date "nt" DTFormat
1 Disp wait drop »
Just STO it into VAR, rename the corresponding file as "key_F9" and now you can run this program just by hiting your F9 key.

Note about program :
If you don't know how what to do with program, you can try by typing this (clic first on new « ») and use the run function to execute it.