1
0
mirror of synced 2025-12-07 13:48:09 +08:00

v1.6.0 多语言支持。

This commit is contained in:
6tail
2023-04-16 18:30:42 +08:00
parent 7a71e07ade
commit 0dddcf841f
4 changed files with 2110 additions and 326 deletions

12
__tests__/I18n.test.js Normal file
View File

@@ -0,0 +1,12 @@
const {Lunar, I18n} = require('../lunar');
test('test1', () => {
const lunar = Lunar.fromYmd(2023,1,1);
console.log(lunar.toFullString());
I18n.setLanguage('en');
console.log(lunar.toFullString());
I18n.setLanguage('chs');
});

View File

@@ -1,4 +1,4 @@
const {Solar, Lunar, Foto, Tao, NineStar, EightChar, SolarWeek, SolarMonth, SolarSeason, SolarHalfYear, SolarYear, LunarMonth, LunarYear, LunarTime, ShouXingUtil, SolarUtil, LunarUtil, FotoUtil, TaoUtil, HolidayUtil} = require('./lunar.js')
const {Solar, Lunar, Foto, Tao, NineStar, EightChar, SolarWeek, SolarMonth, SolarSeason, SolarHalfYear, SolarYear, LunarMonth, LunarYear, LunarTime, ShouXingUtil, SolarUtil, LunarUtil, FotoUtil, TaoUtil, HolidayUtil, I18n} = require('./lunar.js')
module.exports = {
Solar: Solar,
@@ -20,5 +20,6 @@ module.exports = {
LunarUtil: LunarUtil,
FotoUtil: FotoUtil,
TaoUtil: TaoUtil,
HolidayUtil: HolidayUtil
HolidayUtil: HolidayUtil,
I18n: I18n
}

2417
lunar.js

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
{
"name": "lunar-javascript",
"version": "1.3.4",
"version": "1.6.0",
"description": "lunar is a calendar library for Solar and Chinese Lunar.",
"main": "index.js",
"scripts": {