From 142bf3f342698e06a08b3c393d90e36753ce945a Mon Sep 17 00:00:00 2001 From: Eduardo Cavazos Date: Thu, 15 May 2008 16:57:41 -0500 Subject: [PATCH] builder.util: new version of datestamp --- extra/builder/util/util.factor | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/extra/builder/util/util.factor b/extra/builder/util/util.factor index f9ab6c1d1d..db3b476365 100644 --- a/extra/builder/util/util.factor +++ b/extra/builder/util/util.factor @@ -41,12 +41,17 @@ DEFER: to-strings : 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 ) - now `{ ,[ dup timestamp-year ] - ,[ dup timestamp-month ] - ,[ dup timestamp-day ] - ,[ dup timestamp-hour ] - ,[ timestamp-minute ] } + now + { year>> month>> day>> hour>> minute>> } [ pad-00 ] map "-" join ; ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!