Changes

Jump to navigation Jump to search
no edit summary
{{#switch:{{#time:m|{{ctime}}}}
|1={{#ifexpr:{{ctime:00}}<0
|{{#ifexpr:{{#time:d|{{ctime}}}}<32+{{ctime:01}}|12|1}}
|{{#ifexpr:{{#time:d|{{ctime}}}}<{{ctime:01}}|11|12}}}}
|2={{#ifexpr:{{ctime:01}}<0
|{{#ifexpr:{{#time:d|{{ctime}}}}<{{#time:z|{{#time:Y|{{ctime}}}}-3-1}}-31+{{ctime:02}}|1|2}}
|{{#ifexpr:{{#time:d|{{ctime}}}}<{{ctime:01}}|12|1}}}}
|3={{#ifexpr:{{ctime:02}}<0
|{{#ifexpr:{{#time:d|{{ctime}}}}<32+{{ctime:03}}|2|3}}
|{{#ifexpr:{{#time:d|{{ctime}}}}<{{ctime:02}}|1|2}}}}
|4={{#ifexpr:{{ctime:03}}<0
|{{#ifexpr:{{#time:d|{{ctime}}}}<31+{{ctime:04}}|3|4}}
|{{#ifexpr:{{#time:d|{{ctime}}}}<{{ctime:03}}|2|3}}}}
|5={{#ifexpr:{{ctime:04}}<0
|{{#ifexpr:{{#time:d|{{ctime}}}}<32+{{ctime:05}}|4|5}}
|{{#ifexpr:{{#time:d|{{ctime}}}}<{{ctime:04}}|3|4}}}}
|6={{#ifexpr:{{ctime:05}}<0
|{{#ifexpr:{{#time:d|{{ctime}}}}<31+{{ctime:06}}|5|6}}
|{{#ifexpr:{{#time:d|{{ctime}}}}<{{ctime:05}}|4|5}}}}
|7={{#ifexpr:{{ctime:06}}<0
|{{#ifexpr:{{#time:d|{{ctime}}}}<32+{{ctime:07}}|6|7}}
|{{#ifexpr:{{#time:d|{{ctime}}}}<{{ctime:06}}|5|6}}}}
|8={{#ifexpr:{{ctime:07}}<0
|{{#ifexpr:{{#time:d|{{ctime}}}}<32+{{ctime:08}}|7|8}}
|{{#ifexpr:{{#time:d|{{ctime}}}}<{{ctime:07}}|6|7}}}}
|9={{#ifexpr:{{ctime:08}}<0
|{{#ifexpr:{{#time:d|{{ctime}}}}<31+{{ctime:09}}|8|9}}
|{{#ifexpr:{{#time:d|{{ctime}}}}<{{ctime:08}}|7|8}}}}
|10={{#ifexpr:{{ctime:09}}<0
|{{#ifexpr:{{#time:d|{{ctime}}}}<32+{{ctime:10}}|9|10}}
|{{#ifexpr:{{#time:d|{{ctime}}}}<{{ctime:09}}|8|9}}}}
|11={{#ifexpr:{{ctime:10}}<0
|{{#ifexpr:{{#time:d|{{ctime}}}}<31+{{ctime:11}}|10|11}}
|{{#ifexpr:{{#time:d|{{ctime}}}}<{{ctime:10}}|9|10}}}}
|{{#ifexpr:{{ctime:11}}<0
|{{#ifexpr:{{#time:d|{{ctime}}}}<32+{{ctime:12}}|11|12}}
|{{#ifexpr:{{#time:d|{{ctime}}}}<{{ctime:11}}|10|11}}}}}}<noinclude>[[Category:Chinese traditional date templates]]
<templatedata>
{
"description": "to get the month of the year in the Chinese calendar",
"params": {
"1": {
"aliases": [
"d"
],
"label": "date",
"description": "the date in the Gregorian calendar.",
"type": "date",
"default": "today"
}
}
}
</templatedata>
</noinclude>
Anonymous user

Navigation menu