Changes

Jump to navigation Jump to search
m
→‎Usage: fixing lint errors (and a bit of cleanup)
{| class="wikitable sortable" style="float: right; font-size: 90%; line-height: 1.25em; margin-left: 1em;"
|-
! !! Description !! current output
|-
| style="text-align:center;" |<code>A</code> || am/pm of day|| style="text-align:center;" |{{ctime:A}}
|-
| style="text-align:center;" |<code>a</code> || a/p of ''shí''|| style="text-align:center;" |{{ctime:a}}
|-
| style="text-align:center;" |<code>B</code> || ''Bāzì'' upon solar|| style="text-align:center;" |{{ctime:B}}
|-
| style="text-align:center;" |<code>b</code> || ''Bāzì'' upon lunar|| style="text-align:center;" |{{ctime:b}}
|-
| style="text-align:center;" |<code>C</code> || Stem-branch of year|| style="text-align:center;" |{{ctime:C}}
|-
| style="text-align:center;" |<code>c</code> || Stem-branch of year|| style="text-align:center;" |{{ctime:c}}
|-
| style="text-align:center;" |<code>D</code> || Weekday, 0=Sunday|| style="text-align:center;" |{{ctime:D}}
|-
| style="text-align:center;" |<code>d</code> || Day of month || style="text-align:center;" |{{ctime:d}}
|-
| style="text-align:center;" |<code>E</code> || Year upon an epoch|| style="text-align:center;" |{{ctime:E|-2698|AH}}
|-
| style="text-align:center;" |<code>e</code> || Year upon an 114BC|| style="text-align:center;" |{{ctime:e}}
|-
| style="text-align:center;" |<code>F</code> || Month name|| style="text-align:center;" |{{ctime:F}}
|-
| style="text-align:center;" |<code>FdY</code> || Date in common format|| style="text-align:center;" |{{ctime:FdY}}
|-
| style="text-align:center;" |<code>f</code> || Full month number|| style="text-align:center;" |{{ctime:f}}
|-
| style="text-align:center;" |<code>G</code> || ''Gēng''|| style="text-align:center;" |{{ctime:G}}
|-
| style="text-align:center;" |<code>g</code> || ''Gēng'' number|| style="text-align:center;" |{{ctime:g}}
|-
| style="text-align:center;" |<code>go</code> || ''Gēngdiǎn'' || style="text-align:center;" |{{ctime:go}}
|-
| style="text-align:center;" |<code>H</code> || Hour in 24h format|| style="text-align:center;" |{{ctime:H}}
|-
| style="text-align:center;" |<code>Hms</code> || Time in 24h format|| style="text-align:center;" |{{ctime:Hms}}
|-
| style="text-align:center;" |<code>h</code> || Hour in 12h format || style="text-align:center;" |{{ctime:h}}
|-
| style="text-align:center;" |<code>I</code> || Intercalary flag || style="text-align:center;" |{{ctime:I}}
|-
| style="text-align:center;" |<code>i</code> || Mils pass ''shí''|| style="text-align:center;" |{{ctime:i}}
|-
| style="text-align:center;" |<code>J</code> || Mils past ''diǎn''|| style="text-align:center;" |{{ctime:J}}
|-
| style="text-align:center;" |<code>j</code> || Mils past ''kè''|| style="text-align:center;" |{{ctime:j}}
|-
| style="text-align:center;" |<code>K</code> || ''Kè'' || style="text-align:center;" |{{ctime:K}}
|-
| style="text-align:center;" |<code>k</code> || ''Kè'' in ''shí''|| style="text-align:center;" |{{ctime:k}}
|-
| style="text-align:center;" |<code>kS</code> || ''Shíkè''|| style="text-align:center;" |{{ctime:kS}}
|-
| style="text-align:center;" |<code>L</code> || Intercalary month. || style="text-align:center;" |{{ctime:L}}
|-
| style="text-align:center;" |<code>l</code> || Lunar information|| style="text-align:center;" |{{ctime:l}}
|-
| style="text-align:center;" |<code>M</code> || Month number|| style="text-align:center;" |{{ctime:M}}
|-
| style="text-align:center;" |<code>m</code> || Minute || style="text-align:center;" |{{ctime:m}}
|-
| style="text-align:center;" |<code>N</code> || Month index|| style="text-align:center;" |{{ctime:N}}
|-
| style="text-align:center;" |<code>n</code> || Month offset|| style="text-align:center;" |{{ctime:n}}
|-
| style="text-align:center;" |<code>O</code> || ''Diǎn''|| style="text-align:center;" |{{ctime:O}}
|-
| style="text-align:center;" |<code>o</code> || ''Diǎn'' in ''gēng''|| style="text-align:center;" |{{ctime:o}}
|-
| style="text-align:center;" |<code>oG</code> || ''Gēngdiǎn''|| style="text-align:center;" |{{ctime:oG}}
|-
| style="text-align:center;" |<code>P</code> || Phase and zodiac|| style="text-align:center;" |{{ctime:P}}
|-
| style="text-align:center;" |<code>p</code> || Phase and zodiac|| style="text-align:center;" |{{ctime:p}}
|-
| style="text-align:center;" |<code>Q</code> || Festival|| style="text-align:center;" |{{ctime:Q}}
|-
| style="text-align:center;" |<code>q</code> || Solar term name|| style="text-align:center;" |{{ctime:q}}
|-
| style="text-align:center;" |<code>R</code> || Solar term number || style="text-align:center;" |{{ctime:R}}
|-
| style="text-align:center;" |<code>r</code> || Day before solar term|| style="text-align:center;" |{{ctime:r}}
|-
| style="text-align:center;" |<code>S</code> ||''Shí''|| style="text-align:center;" |{{ctime:S}}
|-
| style="text-align:center;" |<code>Sk</code> ||''Shíkè''|| style="text-align:center;" |{{ctime:Sk}}
|-
| style="text-align:center;" |<code>s</code> || Second|| style="text-align:center;" |{{ctime:s}}
|-
| style="text-align:center;" |<code>T</code> || Year length|| style="text-align:center;" |{{ctime:T}}
|-
| style="text-align:center;" |<code>t</code> || Month length|| style="text-align:center;" |{{ctime:t|{{ctime:Y}}|{{ctime:N}}}}
|-
| style="text-align:center;" |<code>U</code> || Timestamp(hjjs)|| style="text-align:center;" |{{ctime:U}}
|-
| style="text-align:center;" |<code>u</code> || Timestamp || style="text-align:center;" |{{ctime:u}}
|-
| style="text-align:center;" |<code>V</code> || Solar term of year|| style="text-align:center;" |{{ctime:V}}
|-
| style="text-align:center;" |<code>v</code> || Solar term of month|| style="text-align:center;" |{{ctime:v}}
|-
| style="text-align:center;" |<code>W</code> || Week of year|| style="text-align:center;" |{{ctime:W}}
|-
| style="text-align:center;" |<code>w</code> || Week of month|| style="text-align:center;" |{{ctime:w}}
|-
| style="text-align:center;" |<code>Y</code> || Year number|| style="text-align:center;" | {{ctime:Y}}
|-
| style="text-align:center;" |<code>Yfd</code> || Date in regular format|| style="text-align:center;" |{{ctime:Yfd}}
|-
| style="text-align:center;" |<code>y</code> || Year offset|| style="text-align:center;" |{{ctime:y}}
|-
| style="text-align:center;" |<code>Z</code> || Stem-branches of day|| style="text-align:center;" |{{ctime:Z}}
|-
| style="text-align:center;" |<code>z</code> || Day of year|| style="text-align:center;" |{{ctime:z}}
|}
The templates convert the date and time in the Gregorian calendar to the Chinese calendar. The range of date is within the nearest 11 Metonic cycles, from the year 1905 to 2113.


{{Documentation subpage}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
== Usage ==
===Date related===
<code>ctime</code> is the format in the Gregorian calendar, today is default and gives <code>{{ctime}}</code>

<code>ctime:FdY</code> is the common format. Today is default and gives <code>{{ctime:F}} {{ctime:d}}, {{ctime:Y}}</code><br><small>''Note: Yīyuè is the intercalary month after Zhēngyuè; Shíèryuè is the common month of intercalary Làyuè.''</small>

<code>ctime:Yfd</code> is the regular format. Today is default and gives <code>{{ctime:Y}}-{{ctime:f}}-{{ctime:d}}</code><br><small>''Notes: 00:Zhēngyuè;01:Zhēngyuè/Yīyuè;02~11:Èryuè~Shíyīyuè;12:Shíèryuè/Làyuè;13:Làyuè;R2~R9:Rùnèryuè~Rùnjǐuyuè;R0:Rùnshíyuè;R1:Rùnshíyiyuè''</small>

<code>ctime:B</code> is the date and shí in ''Bāzì'' format upon solar term. Now is default and gives <code>{{ctime:B}}</code><br><small>''Notes: Using the initial of pinyin except Z for ji, and K for gui.The range of the year is from the day of the winter solstice to the day before the next winter solstice.''</small>

<code>ctime:b</code> is the date and shí in ''Bāzì'' format upon lunar month. Now is default and gives <code>{{ctime:b}}</code><br><small>''Notes: Using the initial of pinyin except Z for jǐ, and K for guì. The years are beginning on Zhēngyuè 1<sub>st</sub>. The stem-branches of the intercalary month is the same as the corresponding common month. The days are beginning at dawn.''</small>
===Day related===
<code>ctime:Z</code> is the number of the date in stem-branches format. Today is default and gives <code>{{ctime:Z}}</code><br><small>''Notes: from 0 to 59, and 0 is Jiǎzǐ''</small>
===Month related===
===Solar term related===
===Year related===
<code>ctime:c</code> is the number of the year in stem-branches format. This year is default and gives <code>{{ctime:c}}</code><br><small>''Notes: from 0 to 59, and 0 is Jiǎzǐ. The year means the calendric year beginning at Zhēngyuè 1<sub>st</sub>''</small>

<code>ctime:C</code> is the name of the year in stem-branches format. This year is default and gives <code>{{ctime:C}}</code>

<code>ctime:P</code> is the name of the year in phase-zodiac format. This year is default and gives <code>{{ctime:P}}</code>

<code>ctime:E|<sub>epoch</sub>|<sub>symbol</sub></code> is the number of the year upon the given epoch. This year is default and gives <code>{{ctime:E|-2698|AH}}</code><br><small>''Notes: if the epoch is BC, add -, and the default is 2698<sub>BC</sub>''</small>

===Time related===
<code>ctime:Hms</code> is the iso format, now is default and gives <code>{{ctime:Hms}}</code>

<code>ctime:go</code> is the regular format for ''Gēngdiǎn'', now is default and gives <code>{{ctime:go}}</code>

<code>ctime:Sk</code> is the regular format for ''Shíkè'', now is default and gives <code>{{ctime:Sk}}</code>

<code>ctime:oG</code> is the common format for ''Gēngdiǎn'', now is default and gives <code>{{ctime:oG}}</code>

<code>ctime:kS</code> is the common format for ''Shíkè'', now is default and gives <code>{{ctime:kS}}</code>

<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
<!-- Categories below this line, please; interwikis at Wikidata -->

}}</includeonly>
Anonymous user

Navigation menu