From b85827ccd6a478d6dcf82836d2adf6b034efaf5d Mon Sep 17 00:00:00 2001 From: Matthias Benkard Date: Tue, 29 May 2007 02:01:26 +0200 Subject: Add a date field to the JOURNAL-ENTRY class. darcs-hash:e1e4df454e63bee56875337e3e4836185b30172b --- journal.lisp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'journal.lisp') diff --git a/journal.lisp b/journal.lisp index bfcfe4b..0c8156e 100755 --- a/journal.lisp +++ b/journal.lisp @@ -75,6 +75,9 @@ :accessor title-of :initarg :title :initform "") + (date :type (integer 0) + :accessor date-of + :initarg :date) (body :type string :accessor body-of :initarg :body @@ -189,6 +192,14 @@ (dolist (journal-entry *journal-entries*) (<:div :class :journal-entry (<:h2 (<:as-html (title-of journal-entry))) + (<:div :class :journal-entry-date + (multiple-value-bind (sec min hour day mon yr + day-of-week zone) + (decode-universal-time (date-of journal-entry)) + (declare (ignore sec day-of-week zone)) + (<:as-html + (format nil "~D.~D.~D, ~D:~D" + day mon yr hour min)))) (<:as-is (journal-markup->html (body-of journal-entry))))))) (<:div :id :navigation) -- cgit v1.2.3