Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a404415b6a5618aa

Jump to content

Template:Ctime/doc

From Wikipedia, the free encyclopedia
CodeDescriptioncurrent output
Aam/pm of dayN/A
aa/p of shíN/A
BBāzì upon solarN/A
bBāzì upon lunarN/A
CStem-branch of year in pinyinBǐngwǔnián
cStem-branch of year42
DDay of lunar month in pinyinChūsì
dDay of lunar month4
EYear upon an epochN/A
eYear upon an 114BCN/A
FLunar month in pinyinBāyuè
fLunar month number08
GGēngN/A
gGēng numberN/A
goGēngdiǎnN/A
HHour in 24h formatN/A
HmsTime in 24h formatN/A
hHour in 12h formatN/A
IIntercalary flag0
infoMod number for month lengths437
iMils pass shíN/A
JMils past diǎnN/A
jMils past kèN/A
KKèN/A
kKè in shíN/A
kSShíkèN/A
LIntercalary month0
lLunar information2266
MMonth number (ignore leap year)8
mMinuteN/A
NMonth index8
nMonth offset206
ODiǎnN/A
oDiǎn in gēngN/A
oGGēngdiǎnN/A
PPhase and zodiacN/A
pPhase and zodiacN/A
QFestivalN/A
qSolar term nameN/A
RSolar term numberN/A
rDay before solar termN/A
SShíN/A
SkShíkèN/A
sSecondN/A
TYear lengthN/A
tMonth length29
UTimestamp(hjjs)N/A
uTimestampN/A
VSolar term of yearN/A
vSolar term of monthN/A
YGregorian year number for the start of lunar year2026
yDate bias47
ZStem-branches of day27
zDay of lunar year210

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]
[edit]

{{ctime}} is the format in the Gregorian calendar, today is default and gives 2026-09-14

{{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.

[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 4 in month 08, 27 (th) stem-branch.
Notes: from 0 to 59, and 0 is Jiǎzǐ

[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)
[edit]
[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