Skip to content

Commit

Permalink
Add a synopsis to README
Browse files Browse the repository at this point in the history
  • Loading branch information
mjradwin committed Jul 8, 2024
1 parent 4117982 commit e59c75e
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,21 @@ Kosher Zmanim itself is a TS/JS port of the [KosherJava](https://github.com/Kosh
$ npm install @hebcal/noaa
```

## Synopsis
```javascript
import {GeoLocation, NOAACalculator} from '@hebcal/noaa';
import {Temporal} from 'temporal-polyfill';

const latitude = 39.73915;
const longitude = -104.9847;
const elevtion = 1636;
const tzid = 'America/Denver';
const gloc = new GeoLocation(null, latitude, longitude, elevtion, tzid);
const plainDate = new Temporal.PlainDate(2020, 6, 5); // Friday June 5 2020
const noaa = new NOAACalculator(gloc, plainDate);

const zdt = noaa.getSunset();
console.log(zdt.toString()); // '2020-06-05T20:32:57.848-06:00[America/Denver]'
```

## [API Documentation](https://hebcal.github.io/api/noaa/index.html)

0 comments on commit e59c75e

Please sign in to comment.