Skip to content

Latest commit

 

History

History
37 lines (27 loc) · 1 KB

README.md

File metadata and controls

37 lines (27 loc) · 1 KB

hdate

Build Status Go Report Card 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
}