Skip to content

sunsidew/ruby_lunardate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ruby_lunardate Gem Version

Korean Lunar/Solar Calendar Library

install

gem install ruby_lunardate

how-to-use

require 'ruby_lunardate'

# from solar to lunar
lun_date = LunarDate.from_solar(2015,9,8)
puts lun_date #=> #<LunarDate: ...>
# => 20150726

# from lunar to solar
sol_date = LunarDate.to_solar(2015,7,26)
puts sol_date #=> #<Date: ...>
# => 2015-09-08

or simply use to_lunar method by Date Class

require 'ruby_lunardate'

# from solar to lunar
lun_date = Date.new(2015,9,8)
puts lun_date.from_solar #=> #<LunarDate: ...>
# => 20150726

# from lunar to solar
sol_date = Date.new(2015,7,26)
puts sol_date.to_solar #=> #<Date: ...>
# => 2015-09-08

About

korean lunar date convert library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages