Skip to content

Commit 3def72d

Browse files
committed
Add synopsis
1 parent fcbf8c1 commit 3def72d

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

README.md

+17-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,18 @@
1-
# hdate-js
1+
# @hebcal/hdate
22
converts between Hebrew and Gregorian dates
3+
4+
[![Build Status](https://github.com/hebcal/hdate-js/actions/workflows/node.js.yml/badge.svg)](https://github.com/hebcal/hdate-js/actions/workflows/node.js.yml)
5+
6+
# Installation
7+
```bash
8+
$ npm install @hebcal/hdate
9+
```
10+
11+
## Synopsis
12+
```javascript
13+
import {greg, abs2hebrew} from '@hebcal/hdate';
14+
15+
const date = new Date(2008, 10, 13); // 13 November 2008
16+
const abs = greg.greg2abs(date);
17+
const hdate = abs2hebrew(abs); // {yy: 5769, mm: CHESHVAN, dd: 15}
18+
```

0 commit comments

Comments
 (0)