
Security News
ESLint Adds Official Support for Linting HTML
ESLint now supports HTML linting with 48 new rules, expanding its language plugin system to cover more of the modern web development stack.
提供具有中国特色的休假安排或者工作日查询。
Add this line to your application's Gemfile:
gem 'chinese-holidays'
And then execute:
$ bundle
Or install it yourself as:
$ gem install chinese-holidays
元旦 = Date.new(2016, 1, 1)
# 是否休假(含正常的周六、周日)
Chinese::Holidays.is_holiday?(元旦) # true
# 是否是工作日(含节假日的调休)
Chinese::Holidays.is_workdingday?(元旦) # fase
# 列出已知的特殊节假日
Chinese::Holidays.all.each do |holiday|
puts "#{holiday.name} #{holiday.days.map {|date| date.strftime('%F')}}"
end
# 元旦 ["2016-01-01", "2016-01-02", "2016-01-03"]
# ...
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/chinese-holidays. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that chinese-holidays demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ESLint now supports HTML linting with 48 new rules, expanding its language plugin system to cover more of the modern web development stack.
Security News
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.