Time Format
Wdid attempts to parse strings that represent times, in a sane manner. This works by translating the passed time into a TimePeriod. When adding items, or setting the time for an item, wdid uses the start of the period to do so. When searching for items, wdid uses the range. This sounds more complicated than it is, in practise it does what you'd expect.
Times can be passed in the following formats:
now
: Now until end of day.0
: Start of today (midnight in your TZ) - equates to "today" when searching. Equivalent today
. Ends end of today.Integer n (e.g.
1
,6
): start of the day, n days ago - equates to "in the last n days" when searching. Ends end of today.day
: Start of today (midnight in your TZ). Equivalent to1
. Ends end of today.week
: Start of the week (monday, midnight in your TZ) - equates to "in the last week" when searching. Ends end of the week.month
: Start of the month (first day of month, midnight in your TZ) - equates to "in the last month" when searching. Ends end of the month.yesterday
: Yesterday.today
: Today.tomorrow
: Tomorrow.monday
: Start Monday of this week. Ends end of that day. Same for every day of the week. Can also use short forms liketue
ortues
.this monday
: Start Monday of this week. Ends that day.next monday
Start Monday of next week. Ends that day.last monday
Start Monday of last week. Ends that day.last week
Start at start of previous week, end at end of that week.next week
Start at start of next week, end at end of that week.last month
Start at start of last month, end at end of that month.next month
Start at start of next month, end at end of that month.YYYY-MM-DD
(2006-01-02
in Go time format): Start of given day in your TZ. Ends end of that day.YYYY-MM-DDTHH:MM
: particular time on a day in your TZ. Ends end of that day.
Note that these times cover a range of values. Usually from the start of the indicated day (00:00) to the end of the day (23:59) at the end of the period, inclusive.
Last updated