🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis
Socket
Book a DemoInstallSign in
Socket

lunar_blessing

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lunar_blessing

bundlerRubyGems.org
Version
0.1.1
Version published
Maintainers
1
Created
Source

LunarBlessing

LunarBlessing is created for converting Chinese Lunar Calendar date to Solar Calendar date. It supports years from 1900 to 2099.

Now LunarBlessing is not supporting convert Solar date to Lunar date, but it's already in todo list. We will add this feature when we need it. So if you wanna contribute, that would be awesome.

Name

This gem name is inspried by a DOTA HERO called Luna, she has a abilitie called Lunar Blessing.

Installation

Add this line to your application's Gemfile:

gem 'lunar_blessing', github: 'mycolorway/lunar_blessing'

And then execute:

$ bundle

Now this gem is not published to rubygems.org yet, so install with git or local is neccessary.

Usage

lunar_date = LunarBlessing::Date.new(year: 2015, month: 12, day: 28)
lunar_date.to_solar #=> '2016-02-06'
lunar_date.to_s #=> '腊月廿八'
lunar_date.to_s(with_year: true) #=> '二〇一六年腊月廿八'

Requirement

This gem only support Ruby version >= 2.1, because we use 'keyword arguments' feature. If you want to remove it and support other ruby versions, a PR is welcome.

License

The gem is available as open source under the terms of the MIT License.

TODO

  • Add to_s for LunarBlessing:Date
  • Convert solar date to lunar date
  • Write document

FAQs

Package last updated on 02 Jan 2018

Did you know?

Socket

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.

Install

Related posts