Template:Compare dates
Appearance
File:Test Template Info-Icon - Version (2).svg Template documentation[view] [edit] [history] [purge]
Usage
This template takes two mandatory unnamed parameters. The first is a date/time string and the second is a level of precision. It then returns a plain language comparison of the date/time to the current UTC date/time. If it's not the next, current, or previous one, the template just returns the date/time entered.
Examples
{{Compare dates|19:47 15 June 2026|hour}}returnsthis hour{{Compare dates|15 June 2026|day}}returnstoday{{Compare dates|May 2026|month}}returnslast month{{Compare dates|October 2026|month}}returnsOctober 2026{{Compare dates|October 1887|month}}returnsOctober 1887
See also
- {{Is now}}
- {{Age switch}}