Make query function signatures more consistent

This commit is contained in:
contrapunctus 2021-01-09 12:28:28 +05:30
parent b3dbd21771
commit cddeeb0d32
3 changed files with 6 additions and 6 deletions

View File

@ -789,7 +789,7 @@ Function - chronometrist-task-time-one-day (task &optional (ts (ts-now)))
String &optional ts -> seconds
@end itemize
@item
Function - chronometrist-active-time-one-day (&optional ts)
Function - chronometrist-active-time-one-day (&optional (ts (ts-now)))
@itemize
@item
&optional ts -> seconds
@ -797,7 +797,7 @@ Function - chronometrist-active-time-one-day (&optional ts)
@item
Function - chronometrist-statistics-count-active-days (task &optional (table chronometrist-events))
@item
Function - chronometrist-task-events-in-day (task ts)
Function - chronometrist-task-events-in-day (task &optional (ts (ts-now)))
@end enumerate
@node chronometrist-report-customel

View File

@ -326,10 +326,10 @@ Each of these has a corresponding function to clear it and fill it with values -
* -> plist
2. Function - chronometrist-task-time-one-day (task &optional (ts (ts-now)))
* String &optional ts -> seconds
3. Function - chronometrist-active-time-one-day (&optional ts)
3. Function - chronometrist-active-time-one-day (&optional (ts (ts-now)))
* &optional ts -> seconds
4. Function - chronometrist-statistics-count-active-days (task &optional (table chronometrist-events))
5. Function - chronometrist-task-events-in-day (task ts)
5. Function - chronometrist-task-events-in-day (task &optional (ts (ts-now)))
** chronometrist-report-custom.el
1. Custom variable - chronometrist-report-buffer-name

View File

@ -40,7 +40,7 @@ The return value is seconds, as an integer."
;; no events for this task on TS, i.e. no time spent
0)))
(defun chronometrist-active-time-one-day (&optional ts)
(cl-defun chronometrist-active-time-one-day (&optional (ts (ts-now)))
"Return the total active time on TS (if non-nil) or today.
TS must be a ts struct (see `ts.el')
@ -65,7 +65,7 @@ which span midnights. (see `chronometrist-events-clean')"
table)
count))
(defun chronometrist-task-events-in-day (task ts)
(cl-defun chronometrist-task-events-in-day (task &optional (ts (ts-now)))
"Get events for TASK on TS.
TS should be a ts struct (see `ts.el').