Template:DaysSinceStart: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
(8 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
=== Syntax === | === Syntax === | ||
< | <pre> | ||
{{DaysSinceStart|YYYY-MM-DD}} | {{DaysSinceStart|YYYY-MM-DD}} | ||
</ | </pre> | ||
=== Example === | === Example === | ||
< | <pre> | ||
{{DaysSinceStart|2023-08-26}} | {{DaysSinceStart|2023-08-26}} | ||
</ | </pre> | ||
This example will display the number of days since August 26, 2023. | This example will display the number of days since August 26, 2023. | ||
== Notes == | == Notes == | ||
*Ensure the date is provided in the format YYYY-MM-DD. | |||
*If no start date is provided, the template will display an informational message. | |||
</noinclude> | |||
< | <includeonly>{{#if: {{{1|}}} | | ||
{{#if: {{{1|}}} | | |||
{{#expr: | {{#expr: | ||
({{#time: U}} - {{#time: U | {{{1}}}}}) / 86400 round 0 | ({{#time: U}} - {{#time: U | {{{1}}}}}) / 86400 round 0 | ||
}} | }} | ||
| | | | ||
This template calculates the number of days since a given start date. Please provide a start date in the format YYYY-MM-DD. | This template calculates the number of days since a given start date. Please provide a start date in the format YYYY-MM-DD. | ||
}} | }}</includeonly> |
Latest revision as of 02:29, 21 July 2024
Usage
This template calculates the number of days since a given start date.
Syntax
{{DaysSinceStart|YYYY-MM-DD}}
Example
{{DaysSinceStart|2023-08-26}}
This example will display the number of days since August 26, 2023.
Notes
- Ensure the date is provided in the format YYYY-MM-DD.
- If no start date is provided, the template will display an informational message.