Template:DaysSinceStart: Difference between revisions

From Know Islam
Jump to navigation Jump to search
No edit summary
No edit summary
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#expr:  
<noinclude>
  ({{#time: Ymd | {{CURRENTYEAR}}-08-26}} - {{#time: Ymd | 2023-08-26}}) / 10000
== Usage ==
}}
This template calculates the number of days since a given start date.
 
=== Syntax ===
<pre>
{{DaysSinceStart|YYYY-MM-DD}}
</pre>
 
=== Example ===
<pre>
{{DaysSinceStart|2023-08-26}}
</pre>
 
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.
</noinclude>
 
<includeonly>{{#if: {{{1|}}} |
  {{#expr:  
    ({{#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.
}}</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.