Skip to content

Commit 76ffa08

Browse files
committed
fix: update docs to match type signature 2
1 parent 31548b4 commit 76ffa08

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
@@ -122,11 +122,10 @@ Returns a `Date` object equal to the given [time object], converting the time zo
122122
* `time` - a complete [time object]
123123

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

0 commit comments

Comments
 (0)