Coder Social home page Coder Social logo

solarlunar's People

Contributors

nosixtools avatar rickywanggithub avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

solarlunar's Issues

compareWeek has some bug?

image
should be as follows: @nosixtools
image

which lead to the 2021 Thanks Giving Day get nothing.
festival := festival.NewFestival("./festival.json"); fmt.Println(festival.GetFestivals("2021-11-24"))

日期计算有点问题

举个栗子,关于感恩节(m11w4n5)的计算,不是第4周周4,而是第4个周四,如果第一个周没有周四,就不算第一周

无法解析阴历二月三十

你用阳历的time.parse方法解析输入的阴历字符串, 肯定无法解析阴历二月三十.
比如, LunarToSolar("2020-02-30", false), 肯定有这一天, 结果是解析错误

关于新历农历转换的问题

solarlunar.go 105行和106行
dayDuaration, _ := time.ParseDuration("24h")
myDate = myDate.Add(dayDuaration * time.Duration(offset))
这个计算时间有问题,应该换成
myDate = myDate.AddDate(0, 0, offset)
如果用上面那个会造成比如
image这样的时间

获取节日有些问题

  • 获取节日,数据重复输出的问题

  • 经常遇到一个日期输入,输入大量重复数据的问题,例如输入2022-02-14,输出[情人节,情人节,情人节,情人节。。。。。。] 好多个情人节的情况

  • 获取节日,有时不准确
    例如某一天2022-11-27,输出为[ 元旦,春节]

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.