Skip to content

nadavk72/hebruby

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hebruby

Hebruby is a Ruby library to convert julian dates to hebrew dates, and vice-versa.

Written by Ron Evans (ron dot evans at gmail dot com or www.deadprogrammersociety.com).

Additional code contributed by Joshua Harvey.

Algorithm rewritten by Ken Bloom (kbloom@gmail.com) based on ‘Calendrical Calculations’ by Nachum Dershowitz and Edward M. Reingold, Cambridge University Press (1997), as implemented in emacs’ lisp/calendar/cal-hebrew.el

How to install

gem install hebruby

How to use:

require 'hebruby'

hebrew_date = Hebruby::HebrewDate.new(2, 4, 5728)

puts hebrew_date.day # => 2
puts hebrew_date.month # => 4
puts hebrew_date.month_name # => Tamuz
puts hebrew_date.heb_month_name # => תמוז
puts hebrew_date.year # => 5728
puts hebrew_date.heb_year_name # => התשכ"ח
puts hebrew_date.julian_date  # => 1968-06-28

About

Hebrew date conversion library for Ruby

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%