Simple database: Difference between revisions

(→‎{{header|Common Lisp}}: seperate season and episode, handle default values for each. (episode increments by 1))
(→‎{{header|Common Lisp}}: add default date)
Line 80:
collect (subseq string i j)
while j))
(defun format-ymd ()
(multiple-value-bind (second minute hour date month year day-of-week dst-p tz)
(get-decoded-time)
(declare (ignore second minute hour day-of-week dst-p tz))
(format nil "~a.~a.~a" date month year)))
 
(defun parse-date (date)
Line 97 ⟶ 102:
:season (parse-number (prompt-read "Season" (cdr (assoc 'season last))))
:episode (parse-number (prompt-read "Episode" (1+ (cdr (assoc 'episode last)))))
:date (parse-date (prompt-read "Date watched" (format-ymd)))
:tags (parse-tags (prompt-read "Tags"))))
 
Anonymous user