Define default method for task-records-for-date

This commit is contained in:
contrapunctus 2022-04-21 09:52:53 +05:30
parent ecaf35f842
commit 3f8253daa4
1 changed files with 8 additions and 1 deletions

View File

@ -1119,7 +1119,14 @@ entire (unsplit) record must be returned."))
(:documentation "From BACKEND, return records for TASK on DATE-TS as a list of plists.
DATE-TS must be a `ts.el' struct.
Return nil if BACKEND contains no records."))
Return nil if BACKEND contains no records.")
(:method ((backend chronometrist:backend)
(task string)
(date integer)
&key &allow-other-keys)
(loop for interval in (intervals (get-day date backend))
when (equal task (name interval))
collect interval)))
#+END_SRC
***** task-records-for-date :before:method: