(datetime.tal) Added numeric display of date

This commit is contained in:
Devine Lu Linvega 2023-07-16 11:59:30 -07:00
parent a0b739f8da
commit a75f4a1496
1 changed files with 17 additions and 8 deletions

View File

@ -6,16 +6,25 @@
|0100 |0100
@on-reset ( -> ) @on-reset ( -> )
<print-date> <print-date-num>
#0a18 DEO #0a .Console/write DEO
<print-time> <print-date-str>
#0a18 DEO #0a .Console/write DEO
<print-time-num>
#0a .Console/write DEO
<print-doty> <print-doty>
#0a18 DEO #0a .Console/write DEO
#800f DEO #800f DEO
BRK BRK
@<print-date> ( -- ) @<print-date-num> ( -- )
.DateTime/year DEI2k <print-dec>
[ LIT "- ] .Console/write DEO
INC INC DEIk INC <print-dec-pad>
[ LIT "- ] .Console/write DEO
INC DEI !<print-dec-pad>
@<print-date-str> ( -- )
;dict/date <print-str> ;dict/date <print-str>
[ LIT2 00 -DateTime/dotw ] DEI #20 SFT ;week-txt ADD2 <print-str> [ LIT2 00 -DateTime/dotw ] DEI #20 SFT ;week-txt ADD2 <print-str>
[ LIT2 20 ", ] #18 DEO [ LIT2 20 ", ] #18 DEO
@ -27,13 +36,13 @@
#18 DEO #18 DEO
.DateTime/year DEI2 !<print-dec> .DateTime/year DEI2 !<print-dec>
@<print-time> ( -- ) @<print-time-num> ( -- )
;dict/time <print-str> ;dict/time <print-str>
.DateTime/hour DEIk <print-dec-pad> .DateTime/hour DEIk <print-dec-pad>
[ LIT2 ": 18 ] DEO [ LIT2 ": 18 ] DEO
INC DEIk <print-dec-pad> INC DEIk <print-dec-pad>
[ LIT2 ": 18 ] DEO [ LIT2 ": 18 ] DEO
DEI !<print-dec-pad> INC DEI !<print-dec-pad>
@<print-str> ( str* -- ) @<print-str> ( str* -- )
&w ( -- ) &w ( -- )