Template:Ctime/doc

From Nordic Larp Wiki
< Template:Ctime
Revision as of 03:44, 2 April 2018 by en>Pauli133 (→‎Usage: fixing lint errors (and a bit of cleanup))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Description current output
A am/pm of day pm
a a/p of shí a
B Bāzì upon solar YS-YY-YY-KH
b Bāzì upon lunar YS-JS-YY-KH
C Stem-branch of year Yǐsìnián
c Stem-branch of year 41
D Weekday, 0=Sunday 6
d Day of month 22
E Year upon an epoch 4723AH
e Year upon an 114BC 2139
F Month name Qīyuè
FdY Date in common format Qīyuè 22, 2025
f Full month number 07
G Gēng Post
g Gēng number 9
go Gēngdiǎn 9:29
H Hour in 24h format 15
Hms Time in 24h format 15:34:35
h Hour in 12h format 03
I Intercalary flag 0
i Mils pass shí 144
J Mils past diǎn 44
j Mils past 54
K 64
k in shí 2
kS Shíkè preshen

2 ke54 fen

L Intercalary month. 4
l Lunar information 4442
M Month number 7
m Minute 34
N Month index 8
n Month offset 206
O Diǎn 38
o Diǎn in gēng 2
oG Gēngdiǎn post 2 point 94 fen
P Phase and zodiac Year of wooden Snake
p Phase and zodiac Mùshénián
Q Festival
q Solar term name 32, Autumnal Equinox
R Solar term number 17
r Day before solar term 10
S Shí Shēn
Sk Shíkè 66:54
s Second 35
T Year length 384
t Month length 30
U Timestamp(hjjs) 0712/10120722R7254
u Timestamp 20250722T153435
V Solar term of year 15
v Solar term of month 2
W Week of year 33
w Week of month 3
Y Year number 2025
Yfd Date in regular format 2025-07-22
y Year offset 28
Z Stem-branches of day 21
z Day of year 228

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.


Usage

Date related

ctime is the format in the Gregorian calendar, today is default and gives 2025-09-13

ctime:FdY is the common format. Today is default and gives Qīyuè 22, 2025
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 2025-07-22
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è

ctime:B is the date and shí in Bāzì format upon solar term. Now is default and gives YS-YY-YY-KH
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 YS-JS-YY-KH
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:Z is the number of the date in stem-branches format. Today is default and gives 21
Notes: from 0 to 59, and 0 is Jiǎzǐ

Month related

Solar term related

Year related

ctime:c is the number of the year in stem-branches format. This year is default and gives 41
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 Yǐsìnián

ctime:P is the name of the year in phase-zodiac format. This year is default and gives Year of wooden Snake

ctime:E|epoch|symbol is the number of the year upon the given epoch. This year is default and gives 4723AH
Notes: if the epoch is BC, add -, and the default is 2698BC

Time related

ctime:Hms is the iso format, now is default and gives 15:34:35

ctime:go is the regular format for Gēngdiǎn, now is default and gives 9:29

ctime:Sk is the regular format for Shíkè, now is default and gives 66:54

ctime:oG is the common format for Gēngdiǎn, now is default and gives post 2 point 94 fen

ctime:kS is the common format for Shíkè, now is default and gives preshen 2 ke54 fen