[bknr-cvs] r2069 - trunk/bknr/src/utils

bknr at bknr.net bknr at bknr.net
Thu Nov 16 06:11:07 UTC 2006


Author: hhubner
Date: 2006-11-16 01:11:04 -0500 (Thu, 16 Nov 2006)
New Revision: 2069

Modified:
   trunk/bknr/src/utils/utils.lisp
Log:
Add :js-style keyword option to format time specification as
JavaScript Date object constructor.


Modified: trunk/bknr/src/utils/utils.lisp
===================================================================
--- trunk/bknr/src/utils/utils.lisp	2006-11-09 17:05:06 UTC (rev 2068)
+++ trunk/bknr/src/utils/utils.lisp	2006-11-16 06:11:04 UTC (rev 2069)
@@ -13,7 +13,7 @@
 			 (show-year t) (show-month t)
 			 (show-date t) (show-time t) (show-weekday nil)
 			 (show-seconds t)
-			 vms-style mail-style xml-style)
+			 vms-style mail-style xml-style js-style)
   (or show-date show-time
       (warn "format-date-time: show-date and show-time are nil, nothing printed"))
   (multiple-value-bind (sec min hour day month year weekday)
@@ -40,6 +40,9 @@
 	(xml-style
 	 (format s "~4,'0d~2,'0d~2,'0dT~2,'0d~2,'0d~2,'0d"
 		 year month day hour min sec))
+	(js-style
+	 (format s "new Date(~4,'0d, ~2,'0d, ~2,'0d, ~2,'0d, ~2,'0d, ~2,'0d)"
+		 year month day hour min sec))
 	(t
 	 (when show-weekday
 	   (format s "~a " weekday))




More information about the Bknr-cvs mailing list