uxn

Varvara Ordinator, written in ANSI C(SDL2)
git clone https://git.eamoncaddigan.net/uxn.git
Log | Files | Refs | README | LICENSE

commit a75f4a1496e9a42347a859af14f9f627d4a54e9c
parent a0b739f8daf9b7a532efae6d7df1cb65116f0f5d
Author: Devine Lu Linvega <aliceffekt@gmail.com>
Date:   Sun, 16 Jul 2023 11:59:30 -0700

(datetime.tal) Added numeric display of date

Diffstat:
Mprojects/examples/devices/datetime.tal | 25+++++++++++++++++--------
1 file changed, 17 insertions(+), 8 deletions(-)

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