Skip to content

Latest commit

 

History

History
36 lines (26 loc) · 891 Bytes

File metadata and controls

36 lines (26 loc) · 891 Bytes

hdate

Build Status GoDoc

Hebcal's hdate package converts between Hebrew and Gregorian dates.

It also includes functions for calculating personal anniversaries (Yahrzeit, Birthday) according to the Hebrew calendar.

Internally, it uses R.D. (Rata Die) day numbers.

Example

package main

import (
	"fmt"
	"time"

	"github.com/hebcal/hdate"
)

func main() {
	hd := hdate.New(5765, hdate.Adar2, 22)
	year, month, day := hd.Greg()
	fmt.Println(year, month, day)
	// Output: 2005 April 2

	hd2 := hdate.FromGregorian(2008, time.November, 13)
	fmt.Println(hd2)
	// Output: 15 Cheshvan 5769
}