[Awesome Ruby Gem] Use chinese_holiday gem to initialize Chinese holidays, or add and remove your holidays
chinese_holiday
chinese_pinyin is a gem to initialize Chinese holidays, or add and remove your holidays.
Installation
You can install it as a gem:
1 | gem install chinese_holiday https://github.com/shawndodo/chinese_holiday.git |
or add it into a Gemfile (Bundler):
1 | # Gemfile |
Then, run bundle install
.
1 | bundle install |
Usages
Run once a year to initialize the latest holiday date:
1 | $ bundle exec rails run "ChineseHoliday::CalendarInit.init_calendar" |
Add your holiday:
1 | holiday = ChineseHoliday::ChineseCalendar.new) |
Attribues of ChineseHoliday::ChineseCalendar
:
1 | # == Schema Information |
References
[1] GitHub - shawndodo/chinese_holiday - https://github.com/shawndodo/chinese_holiday