Coder Social home page Coder Social logo

get_holiday_cn's Issues

关于尚未发布节假日的年份,会获取到空数据的问题

我看了下 NateScarlet/holiday-cn 里的数据,已经有2024年的文件了,但是里面的数据都是空的。
所以会导致尝试获取2024年节假日信息时 status = 1,holiday = None,这都没问题。但是年底这个文件更新了,而本地没有做过期处理,除非手动删除json文件,否则就永远拿不到2024年的节假日信息。必须要在2024年再进行一次手动刷新数据才能获得最新结果。
看README里写的1.0.5貌似是修复了这个问题,但是我看代码里没看到任何相关的代码。
我自己试了下把package文件夹里的2023.json改成和2024.json一样的格式,果然也不能获取2023年的节假日。
所以是否还需要做文件更新的比对?如果实现起来比较困难,则当 json 里面 days 为空的时候,是否每次都要获取一下文件,或者如果当前日期已经是新的一年了,就重新获取一次文件?

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.