builder.util: new version of datestamp
parent
d7b296211e
commit
142bf3f342
|
@ -41,12 +41,17 @@ DEFER: to-strings
|
||||||
|
|
||||||
: host-name* ( -- name ) host-name "." split first ;
|
: host-name* ( -- name ) host-name "." split first ;
|
||||||
|
|
||||||
|
! : datestamp ( -- string )
|
||||||
|
! now `{ ,[ dup timestamp-year ]
|
||||||
|
! ,[ dup timestamp-month ]
|
||||||
|
! ,[ dup timestamp-day ]
|
||||||
|
! ,[ dup timestamp-hour ]
|
||||||
|
! ,[ timestamp-minute ] }
|
||||||
|
! [ pad-00 ] map "-" join ;
|
||||||
|
|
||||||
: datestamp ( -- string )
|
: datestamp ( -- string )
|
||||||
now `{ ,[ dup timestamp-year ]
|
now
|
||||||
,[ dup timestamp-month ]
|
{ year>> month>> day>> hour>> minute>> } <arr>
|
||||||
,[ dup timestamp-day ]
|
|
||||||
,[ dup timestamp-hour ]
|
|
||||||
,[ timestamp-minute ] }
|
|
||||||
[ pad-00 ] map "-" join ;
|
[ pad-00 ] map "-" join ;
|
||||||
|
|
||||||
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
|
Loading…
Reference in New Issue