* *date* or *time*: anything that can be recognized by perl [[str2time|http://search.cpan.org/~rse/lcwa-1.0.0/lib/lwp/lib/HTTP/Date.pm]] function, *without any comma*.
* *delta*: One of the following patterns:
* `Y-M-D`: positive date;
* `H:M:S`: positive time;
* `Y-M-D H:M:S`: positive date and time;
* Add `-` at the beginning of the string to make durations negative.
* several arguments: when two arguments are provided, they are passed as one string, which is then split according to the last comma.
## Time zones
Key `timezone` in the setup file is used to define time zone. If not set, we
try to guess the local time zone.
## Examples
### Some functions
* `ctime_gt_page(foo)`: match pages created after page `foo`.
* `cdate_eq_today()`: match pages created the day the wiki is compiled.
* `mtime_eq_now()`: match pages modified the time the wiki is compiled (likely no page, since comparison is done up to the milisecond).
* `cdate_geq_page_delta(foo, 00-00-01)`: match pages created at least one day after page `foo`.
* `cdate_gt_page(foo)`: same as the previous one.
* `mdate_gt_today_delta(-00-01-00)`: match pages modified one month ago, or later (can be used to display recent changes).
### Use case
It can be used to display a list of upcoming events.
\[[!inline pages="events/* and cdate_geq_today()" reverse=yes sorted=meta(date)]]
## Code
Code and documentation this way: [[https://atelier.gresille.org/projects/gresille-ikiwiki/wiki/datetime_cmp]].