aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/oneliner.lisp5
-rw-r--r--lib/util.lisp7
2 files changed, 10 insertions, 2 deletions
diff --git a/lib/oneliner.lisp b/lib/oneliner.lisp
index 668a82c..8386fa9 100644
--- a/lib/oneliner.lisp
+++ b/lib/oneliner.lisp
@@ -75,7 +75,7 @@
(let* ((title-line-format-str
(concatenate 'string "~" (prin1-to-string *term-width*) "<[~a]~;~a~;~a~>~%"))
(tags-line-format-string
- (concatenate 'string "~" (prin1-to-string *term-width*) "<~a~;by ~a~>~%")))
+ (concatenate 'string "~" (prin1-to-string *term-width*) "<~a~;by ~a ~a~>~%")))
(loop repeat *term-width* do (princ #\_))
(terpri)
(format t title-line-format-str
@@ -87,7 +87,8 @@
(equalp "manual" (oneliner-runstyle ol))))
(format t tags-line-format-string
(format nil "tags: ~{~a~^ ~}" (oneliner-tags ol))
- (oneliner-createdby ol))
+ (oneliner-createdby ol)
+ (datestring-of-universal-time (oneliner-createdat ol)))
(loop
for x from 0 to (length (oneliner-brief ol)) by *term-width*
do (format t "~a~%"
diff --git a/lib/util.lisp b/lib/util.lisp
index 4b827f1..441b2e0 100644
--- a/lib/util.lisp
+++ b/lib/util.lisp
@@ -71,6 +71,12 @@ determined by EXECUTABLE-ON-SYSTEM-P."
(if what "true" "false"))
+(defun datestring-of-universal-time (ut)
+ (multiple-value-bind
+ (sec min hour day month year) (decode-universal-time ut)
+ (declare (ignore sec min hour))
+ (format nil "~a-~2,'0d-~2,'0d" year month day)))
+
(defmacro defplist (name &rest slots)
(let* ((slots-names
(loop for slot in slots
@@ -92,3 +98,4 @@ determined by EXECUTABLE-ON-SYSTEM-P."
`(progn
,make-name-defun
,@slot-defuns)))
+