|
|
<includeonly>{{#vardefine:res|{{DaysOfYearsTTL4|{{{1|}}}|{{{2|}}}}}}}{{#if:{{IDE|{{{1|}}}|100}}|{{#vardefine:year|{{#expr:{{{1|}}}-100}}}}|{{#vardefine:year|{{#expr:floor({{{1|}}}/100)*100}}}}}}<!--初始计算百年-->{{#vardefineechovardefine:year|{{#expr:{{#var:year}}+100}}}}{{#if:{{cmp|{{{2|}}}|{{#var:year}}}}|{{#vardefine:res|{{#expr:{{#var:res}}+{{DaysOfYearsTTL/Add|{{#var:year}}}}}}}}}}<!--这是一个百年,往后直接重复-->{{#vardefine:year|{{#expr:{{#var:year}}+100}}}}{{#if:{{cmp|{{{2|}}}|{{#var:year}}}}|{{#vardefine:res|{{#expr:{{#var:res}}+{{DaysOfYearsTTL/Add|{{#var:year}}}}}}}}}}<!--这是一个百年,往后直接重复-->{{#vardefine:year|{{#expr:{{#var:year}}+100}}}}{{#if:{{cmp|{{{2|}}}|{{#var:year}}}}|{{#vardefine:res|{{#expr:{{#var:res}}+{{DaysOfYearsTTL/Add|{{#var:year}}}}}}}}}}<!--这是一个百年,往后直接重复-->{{#vardefine:year|{{#expr:{{#var:year}}+100}}}}{{#if:{{cmp|{{{2|}}}|{{#var:year}}}}|{{#vardefine:res|{{#expr:{{#var:res}}+{{DaysOfYearsTTL/Add|{{#var:year}}}}}}}}}}<!--这是一个百年,往后直接重复-->{{#vardefine:year|{{#expr:{{#var:year}}+100}}}}{{#if:{{cmp|{{{2|}}}|{{#var:year}}}}|{{#vardefine:res|{{#expr:{{#var:res}}+{{DaysOfYearsTTL/Add|{{#var:year}}}}}}}}}}<!--这是一个百年,往后直接重复-->{{#vardefine:year|{{#expr:{{#var:year}}+100}}}}{{#if:{{cmp|{{{2|}}}|{{#var:year}}}}|{{#vardefine:res|{{#expr:{{#var:res}}+{{DaysOfYearsTTL/Add|{{#var:year}}}}}}}}}}<!--这是一个百年,往后直接重复-->{{#vardefine:year|{{#expr:{{#var:year}}+100}}}}{{#if:{{cmp|{{{2|}}}|{{#var:year}}}}|{{#vardefine:res|{{#expr:{{#var:res}}+{{DaysOfYearsTTL/Add|{{#var:year}}}}}}}}}}<!--这是一个百年,往后直接重复-->{{#vardefine:year|{{#expr:{{#var:year}}+100}}}}{{#if:{{cmp|{{{2|}}}|{{#var:year}}}}|{{#vardefine:res|{{#expr:{{#var:res}}+{{DaysOfYearsTTL/Add|{{#var:year}}}}}}}}}}<!--这是一个百年,往后直接重复-->{{#vardefine:year|{{#expr:{{#var:year}}+100}}}}{{#if:{{cmp|{{{2|}}}|{{#var:year}}}}|{{#vardefine:res|{{#expr:{{#var:res}}+{{DaysOfYearsTTL/Add|{{#var:year}}}}}}}}}}<!--这是一个百年,往后直接重复-->{{#vardefine:year|{{#expr:{{#var:year}}+100}}}}{{#if:{{cmp|{{{2|}}}|{{#var:year}}}}|{{#vardefine:res|{{#expr:{{#var:res}}+{{DaysOfYearsTTL/Add|{{#var:year}}}}}}}}}}<!--这是一个百年,往后直接重复-->{{#var:res}}</includeonly><noinclude>
计算两个年份及之间的总天数,如2018-2020计算的是3年。“四年一闰,百年不闰,四百年再闰”已彻底支持。
|