Skip to content

Commit

Permalink
Add a Gregorian-to-Hebrew conversion example to README
Browse files Browse the repository at this point in the history
  • Loading branch information
mjradwin committed Oct 16, 2023
1 parent d905ece commit 0520203
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package main

import (
"fmt"
"time"

"github.com/hebcal/hdate"
)
Expand All @@ -28,5 +29,9 @@ func main() {
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
}
```

0 comments on commit 0520203

Please sign in to comment.