模板:AgeD

来自Ballance Wiki
BallanceBug讨论 | 贡献2019年8月30日 (五) 12:41的版本 (创建页面,内容为“{{#invoke:age|age_generic|template=age_days}}<noinclude> ==Usage== ====Full dates==== To use, type: :{| |- |<code><nowiki>{{AgeD|date1|date2}}</nowiki></code> |…”)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转至: 导航搜索

0

Usage

Full dates

To use, type:

{{AgeD|date1|date2}}  (number of days between dates 1 and 2),
{{AgeD|date1}} (number of days since date 1) or
{{AgeD||date2}} (number of days until date 2)

Examples:

{{AgeD|19 Aug 2008|4 Sep 2010}} gives 746
{{AgeD|27 May 2002}} gives 7,998

Year, month and day

To use, type:

{{AgeD|year1|month1|day1|year2|month2|day2}}  (number of days between dates 1 and 2),
{{AgeD|year1|month1|day1}} (number of days since date 1) or
{{AgeD||||year2|month2|day2}} (number of day until date 2)

Or with named parameters:

{{AgeD|month1= |day1= |year1= |month2= |day2= | year2= }}  (number of days between dates 1 and 2),
{{AgeD|month1= |day1= |year1= }} (number of days since date 1) or
{{AgeD|month2= |day2= | year2= }} (number of day until date 2)

Examples:

{{AgeD|2007|5|24|2008|4|23}}  gives 335
{{AgeD|2007|5|24}} gives 6175

Formatting

Three styles of formatting are possible.

format=raw gives unformatted numbers with hyphens as minus signs (negative days will occur if the first date is after the second, for use in further calculations).