Template:Ctime
2026-08-20
| Code | Description | current output |
|---|---|---|
A |
am/pm of day | N/A |
a |
a/p of shí | N/A |
B |
Bāzì upon solar | N/A |
b |
Bāzì upon lunar | N/A |
C |
Stem-branch of year in pinyin | Bǐngwǔnián |
c |
Stem-branch of year | 42 |
D |
Day of lunar month in pinyin | Chūbā |
d |
Day of lunar month | 8 |
E |
Year upon an epoch | N/A |
e |
Year upon an 114BC | N/A |
F |
Lunar month in pinyin | Qīyuè |
f |
Lunar month number | 07 |
G |
Gēng | N/A |
g |
Gēng number | N/A |
go |
Gēngdiǎn | N/A |
H |
Hour in 24h format | N/A |
Hms |
Time in 24h format | N/A |
h |
Hour in 12h format | N/A |
I |
Intercalary flag | 0 |
info |
Mod number for month lengths | 437 |
i |
Mils pass shí | N/A |
J |
Mils past diǎn | N/A |
j |
Mils past kè | N/A |
K |
Kè | N/A |
k |
Kè in shí | N/A |
kS |
Shíkè | N/A |
L |
Intercalary month | 0 |
l |
Lunar information | 2266 |
M |
Month number (ignore leap year) | 7 |
m |
Minute | N/A |
N |
Month index | 7 |
n |
Month offset | 177 |
O |
Diǎn | N/A |
o |
Diǎn in gēng | N/A |
oG |
Gēngdiǎn | N/A |
P |
Phase and zodiac | N/A |
p |
Phase and zodiac | N/A |
Q |
Festival | N/A |
q |
Solar term name | N/A |
R |
Solar term number | N/A |
r |
Day before solar term | N/A |
S |
Shí | N/A |
Sk |
Shíkè | N/A |
s |
Second | N/A |
T |
Year length | N/A |
t |
Month length | 29 |
U |
Timestamp(hjjs) | N/A |
u |
Timestamp | N/A |
V |
Solar term of year | N/A |
v |
Solar term of month | N/A |
Y |
Gregorian year number for the start of lunar year | 2026 |
y |
Date bias | 47 |
Z |
Stem-branches of day | 2 |
z |
Day of lunar year | 185 |
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.
All time listed are relative to Beijing time for calculation in Chinese Calendar.
Usage
Date related
{{ctime}} is the format in the Gregorian calendar, today is default and gives 2026-08-20
{{ctime:FdY}} is the common format. Today is default and gives {{ctime:F}} {{ctime:d}}, {{ctime:Y}}
Note: Yīyuè is the intercalary month after Zhēngyuè; Shíèryuè is the common month of intercalary Làyuè.
{{ctime:Yfd}} is the regular format. Today is default and gives {{ctime:Y}}-{{ctime:f}}-{{ctime:d}}
Notes: 00:Zhēngyuè; 01:Zhēngyuè/Yīyuè; 02~11:Èryuè~Shíyīyuè; 12:Shíèryuè/Làyuè; 13:Làyuè; 2R~9R:Rùnèryuè~Rùnjǐuyuè; 0R:Rùnshíyuè; 1R:Rùnshíyiyuè
{{ctime:B}} is the date and shí in Bāzì format upon solar term. Now is default and gives {{ctime:B}}
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.
{{ctime:b}} is the date and shí in Bāzì format upon lunar month. Now is default and gives {{ctime:b}}
Notes: Using the initial of pinyin except Z for jǐ, and K for guì. The years are beginning on Zhēngyuè 1st. The stem-branches of the intercalary month is the same as the corresponding common month. The days are beginning at dawn.
Day related
{{ctime:d}} is the number of the date in the month; {{ctime:Z}} is the number of the date in stem-branches format. Default value is today and gives day 8 in month 07, 2
(th) stem-branch.
Notes: from 0 to 59, and 0 is Jiǎzǐ
Month related
{{ctime:f}} is the lunar month number including leap months; {{ctime:F}} shows the pinyin for the month's name.
{{ctime:M}} is the month number omitting leap month indicator.
{{ctime:N}} is the month index from start of year.
For example, 2020 in Chinese calendar has a leap fourth month (闰四月) right after the fourth month (四月). The month order goes from fourth month -> leap fourth month -> fifth month.
The following lists the return value for each of the month above.
2020 month list
| Month | Template | Return value |
|---|---|---|
| fourth month 四月 |
ctime:f
|
4 |
ctime:F
|
Sìyuè | |
ctime:M
|
4 | |
ctime:N
|
4 (fourth month from start of year) | |
| leap fourth month 闰四月 |
ctime:f
|
4R |
ctime:F
|
Rùnsìyuè | |
ctime:M
|
4 (literally the "fourth" month) | |
ctime:N
|
5 (fifth month from start of year) | |
| fifth month 闰五月 |
ctime:f
|
5 |
ctime:F
|
Wǔyuè | |
ctime:M
|
5 | |
ctime:N
|
6 (sixth month from start of year) |
Solar term related
Year related
{{ctime:Y}} is the Gregorian year number corresponding to the 1st day of the lunar year. This mean that the ctime:Y value for days before Lunar New Year in January/February will usually have the Gregorian year number before. For example, Lunar New Year in 2025 is 29 January 2025. {{ctime:Y|2025-01-28}} returns 2024, but {{ctime:Y|2025-01-29}} returns 2025.
{{ctime:c}} is the number of the year in stem-branches format. This year is default and gives {{ctime:c}}
Notes: from 0 to 59, and 0 is Jiǎzǐ. The year means the calendric year beginning at Zhēngyuè 1st
{{ctime:C}} is the name of the year in stem-branches format. This year is default and gives {{ctime:C}}
{{ctime:P}} is the name of the year in phase-zodiac format. This year is default and gives {{ctime:P}}
{{ctime:E|epoch|symbol}} is the number of the year upon the given epoch. This year is default and gives {{ctime:E|-2698|AH}}
Notes: if the epoch is BC, add -, and the default is 2698BC
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.