summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Benkard <code@mail.matthias.benkard.de>2007-05-29 02:01:26 +0200
committerMatthias Benkard <code@mail.matthias.benkard.de>2007-05-29 02:01:26 +0200
commitb85827ccd6a478d6dcf82836d2adf6b034efaf5d (patch)
tree91f6b2ceb89ccdbb6d963545710132edc68498ac
parentd0fbdea8a23739ae98ab2a30b43b46faaf22d6ae (diff)
Add a date field to the JOURNAL-ENTRY class.
darcs-hash:e1e4df454e63bee56875337e3e4836185b30172b
-rwxr-xr-xjournal.lisp11
1 files changed, 11 insertions, 0 deletions
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)