function getDualCulturalDates() {
const now = new Date();
// 1. Western Format (ISO 8601 or Localized)
const westernDate = now.toLocaleDateString('en-US', {
month: 'long',
day: 'numeric',
year: 'numeric',
});
// 2. Ancient Chinese Format (Lunar/Sexagenary)
// We use the 'zh-u-ca-chinese' locale to trigger the Chinese Calendar
const chineseDate = new Intl.DateTimeFormat('zh-Hans-CN-u-ca-chinese', {
dateStyle: 'full',
//weekday: 'long',
//year: 'numeric',
//month: 'long',
//day: '2-digit',
}).format(now);
return "(Gregorian) " + westernDate + " <<<<V>>>>(农历)" + chineseDate
return {
western: westernDate,
chinese: chineseDate
};
}About
The website is created using Quarto Website and related approaches, solely by Shipeng Sun.
The list of publications is automatically generated using Quarto Citation for Uncited Items.
The simple 2D carousel is adapted from R code used in Quarto Gallery.
The “3D” Image Carousel is based on an Observable JS example. Further revision and optimization are applied to make it work in the Quarto Document.
The simple accordion is created by applying a modified version of Accordion JS.
Suggestions and comments are welcome and appreciated.
© Shipeng Sun. All Rights Reserved.