Template:Ctime
2025-02-13
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 | Yǐsìnián |
c |
Stem-branch of year | 41 |
D |
Day of lunar month in pinyin | Shíliù |
d |
Day of lunar month | 16 |
E |
Year upon an epoch | N/A |
e |
Year upon an 114BC | N/A |
F |
Lunar month in pinyin | Zhēngyuè |
f |
Lunar month number | 01 |
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 | 693 |
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 | 6 |
l |
Lunar information | 4442 |
M |
Month number (ignore leap year) | 1 |
m |
Minute | N/A |
N |
Month index | 1 |
n |
Month offset | 0 |
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 | 30 |
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 | 2025 |
y |
Date bias | 28 |
Z |
Stem-branches of day | 49 |
z |
Day of lunar year | 16 |
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
[edit]Date related
[edit]ctime
is the format in the Gregorian calendar, today is default and gives 2025-02-13
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
[edit]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 16 in month 01, 49
(th) stem-branch
.
Notes: from 0 to 59, and 0 is Jiǎzǐ
Month related
[edit]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
[edit]Year related
[edit]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
Time related
[edit]Use Template:Chinese Time
ctime:Hms
is the iso format, now is default and gives {{ctime:Hms}}
ctime:go
is the regular format for Gēngdiǎn, now is default and gives {{ctime:go}}
ctime:Sk
is the regular format for Shíkè, now is default and gives {{ctime:Sk}}
ctime:oG
is the common format for Gēngdiǎn, now is default and gives {{ctime:oG}}
ctime:kS
is the common format for Shíkè, now is default and gives {{ctime:kS}}