Glich - v0.3.0 Manual
roc - Republic of China calendar
Home Development v0.3.0 Manual Hics Library roc

Calendar Description - Scheme roc

The Republic of China calendar or ROC calendar is a variant of the Gregorian calendar. Also known as Minguo calendar. The calendar scheme is identical to the Gregorian calendar, except the year count starts with year 1 in year Gregorian year 1912 (The founding of the Republic of China).

Use Case

Definition

The Republic of China calendar is based on Gregorian calendar and has the same definition except it has a different epoch.

The Record consists of three Fields named year, month, and day.

Record
yearmonthday

The calendar scheme is implemented by subtracting 1911 from the Gregorian year value.

The Epoch is set at
rocyearmonthday
111
=
gyearmonthday
191211
=
jdnday
2419403
.

Formats

There are a limited number of formats available with this scheme.

Formats - Grammar roc
CodeRulePseudo:inPseudo:outExampleNote
ymdtextyear month dayROC yyy/mm/ddROC 114/6/14D, S
ymd.textyear month dayROC yyy.mm.ddROC 114.6.14S
cns7648textyyy-mm-ddROC yyy-mm-ddROC 114-06-14S
deftextyear month dayyyy mm dd114 6 14H, S
uunit9y 9m 9d9y 9m 9d114y 6m 14dH
Notes: D = Default, H = Hidden, S = Range shortcut supported. Example based on jdn# 2460841

The cns7648 format is based on the National Standards of the Republic of China CNS 7648 which is similar to the ISO 8601 standard. This is implemented using text rules with the hyphan '-' as a separator. This is the same as the minus character which means it is not possible to show negative years. Therefore proleptic dates are not available with this format.

Script

Script - Module hics:roc
grammar roc { name "Republic of China"; fields year month day; alias pseudo { dd day; mm month; yyy year; } alias unit { d day; m month; y year; } format ymd { separators "/,:"; inout "ROC {year}|/{month}|/{day}"; } format "ymd." { separators ".,:"; inout "ROC {year}|.{month}|.{day}"; } format cns7648 { separators "-"; inout "ROC {year::lp:03}|-{month::lp:02}|-{day::lp:02}"; pseudo:out "ROC yyy-mm-dd"; pseudo:in "yyy-mm-dd"; } preferred ymd; } scheme roc { name "Republic of China (Gregorian)"; base gregorian year:1911; grammar roc; }

The script is not dependent on any other script at this time

Home Development v0.3.0 Manual Hics Library roc

Managed by WebPageLayout Validated by HTML Validator (based on Tidy)

12th June 2025