Template:Compare dates/doc
Appearance
| This is a documentation subpage for Template:Compare dates. It may contain usage information, categories and other content that is not part of the original template page. |
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|01:34 21 April 2026|hour}}returnsthis hour{{Compare dates|21 April 2026|day}}returnstoday{{Compare dates|March 2026|month}}returnslast month{{Compare dates|August 2026|month}}returnsAugust 2026{{Compare dates|October 1887|month}}returnsOctober 1887
See also
- {{Is now}}
- {{Age switch}}