Difference between revisions of "Template:TimeBetween"
From Detective Conan Wiki
| Line 1: | Line 1: | ||
| − | <includeonly>{{ | + | <includeonly>{{#switch: {{{1}}} |
| + | | Y = {{timeBetween/YearsBetween|{{{2}}}|{{{3}}} }} | ||
| + | | Error: Invalid returntype | ||
| + | }}</includeonly> | ||
<noinclude>'''Format:''' | <noinclude>'''Format:''' | ||
<pre> | <pre> | ||
| − | {{timeBetween|DateTime1|DateTime2}} | + | {{timeBetween| ReturnType | DateTime1 | DateTime2 }} |
</pre> | </pre> | ||
| − | ''' | + | ReturnType accepts the following values, which are used to control what unit of time is returned by the function (case-sensitive): |
| + | * Y | ||
| + | <!-- * M | ||
| + | * W | ||
| + | * D | ||
| + | * h | ||
| + | * m | ||
| + | * s --> | ||
| + | |||
| + | |||
| + | '''Notes:''' | ||
| + | * DateTime2 must be a later date/time than DateTime1 | ||
| + | * The template presumes both dates/times as in the same time zone. | ||
== See also == | == See also == | ||
| − | * [[Template: | + | * [[Template:timeBetween/YearsBetween]]</noinclude> |
Revision as of 04:14, 20 April 2025
Format:
{{timeBetween| ReturnType | DateTime1 | DateTime2 }}
ReturnType accepts the following values, which are used to control what unit of time is returned by the function (case-sensitive):
- Y
Notes:
- DateTime2 must be a later date/time than DateTime1
- The template presumes both dates/times as in the same time zone.