Giter Club home page Giter Club logo

Comments (3)

ytliu0 avatar ytliu0 commented on August 18, 2024

我不知道你说的"农历时间"是指什么。**在1912年改用公历,1929年起以东经120度的区时为标准时间,就是现在的北京时间。2017年官方发布的《农历的编算和颁行》(GB/T 33661-2017)文件明确说明"农历日是从北京时间0时起计量到北京时间24时截止的时间间隔"。如果现在确是有人用"农历时间",而且与北京时间不同,就请你问那些人吧。

from chinesecalendar.

mfyang avatar mfyang commented on August 18, 2024

不好意思,没表达清楚。 是指您的程序,如何调用某个函数/接口,提供一个公历的具体日期/时间,返回相应的阴历日期/时间?

我的理解您研究了大量资料,实现了各个朝代的历法。

from chinesecalendar.

ytliu0 avatar ytliu0 commented on August 18, 2024

我的理解您研究了大量资料,实现了各个朝代的历法。

我没有时间也没有能力这样做,这个项目只是玩玩而已。编算农历的方法在这里有介绍
https://ytliu0.github.io/ChineseCalendar/computation_simp.html

程序的具体操作主要是用查表法,在calendarData.js档案有函数ChineseToGregorian()返回二维array载有从-105年到2200年农历每月初一在公历的日数和闰月资料,用这array就可以实现公历-农历的转换。1912年前的数据基本上取自张培瑜《三千五百年历日天象》,之后的数据主要用现代农历法则编算。注意这array并没有四次更改正月月建的资料,数据皆以建寅作为起始月,所以改正月月建的那二十多年的历日需要另外处理。-105年前及分裂时代其他朝代的历法则另有函数计算,在ancientCalendars.js和split.js档案可找到。

from chinesecalendar.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.