Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong gzYear for 2020 #17

Open
richardkyk opened this issue Oct 17, 2019 · 2 comments
Open

Wrong gzYear for 2020 #17

richardkyk opened this issue Oct 17, 2019 · 2 comments

Comments

@richardkyk
Copy link

console.log(solarLunar.solar2lunar(2020, 1, 25));

{ lYear: 2020,
  lDay: 1,
  animal: '鼠',
  yearCn: '二零二零年',
  monthCn: '正月',
  dayCn: '初一',
  cYear: 2020,
  cMonth: 1,
  cDay: 25,
  gzYear: '己亥',
  gzMonth: '丁丑',
  gzDay: '丁卯',
  isToday: false,
  isLeap: false,
  nWeek: 6,
  ncWeek: '星期六',
  isTerm: false,
  term: '' }

gzYear: '己亥', should be 庚子

@MoonBall
Copy link

MoonBall commented Jan 3, 2020

@richardkyk chinese-lunar-calendar 这个包是好的

@ChauncyWu
Copy link

console.log(solarLunar.solar2lunar(2020, 1, 25));

{ lYear: 2020,
  lDay: 1,
  animal: '鼠',
  yearCn: '二零二零年',
  monthCn: '正月',
  dayCn: '初一',
  cYear: 2020,
  cMonth: 1,
  cDay: 25,
  gzYear: '己亥',
  gzMonth: '丁丑',
  gzDay: '丁卯',
  isToday: false,
  isLeap: false,
  nWeek: 6,
  ncWeek: '星期六',
  isTerm: false,
  term: '' }

gzYear: '己亥', should be 庚子

gzYear 是根据立春日(大概2月4日左右)来结算的,2020-01-25还属于“己亥”,2020-02-04(立春)开始是“庚子”

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants