Skip to content

Commit b9e3645

Browse files
committed
fix: update docs to match type signature 2
1 parent a0e5cd6 commit b9e3645

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

docs/API.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,10 @@ Returns a `Date` object equal to the given [time object], converting the time zo
123123
* `time` - a complete [time object]
124124

125125
```js
126-
const { findTimeZone, convertTimeToDate } = require('timezone-support')
127-
const berlin = findTimeZone('Europe/Berlin')
128-
const berlinTime = { year: 2018, month: 9, day: 2, hours: 10, minutes: 0,
129-
zone: { abbreviation: 'CEST', offset: -120 } }
130-
const date = convertTimeToDate(date, berlin)
126+
const { convertTimeToDate } = require('timezone-support')
127+
const localTime = { year: 2018, month: 9, day: 2, hours: 10, minutes: 0,
128+
zone: { abbreviation: 'CEST', offset: -120 } }
129+
const date = convertTimeToDate(date)
131130
// Returns a date in the local time
132131
```
133132

0 commit comments

Comments
 (0)