Skip to content

Commit 50b2965

Browse files
superhawk610prantlf
authored andcommitted
fix: update docs to match type signature
Fix the example for `convertDateToTime` to match the expected signature.
1 parent b9e3645 commit 50b2965

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

docs/API.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,9 @@ Returns a complete [time object] equal to the given date using the the local tim
101101
* `date` - a source `Date` object
102102

103103
```js
104-
const { findTimeZone, convertDateToTime } = require('timezone-support')
105-
const berlin = findTimeZone('Europe/Berlin')
104+
const { convertDateToTime } = require('timezone-support')
106105
const date = new Date()
107-
const berlinTime = convertDateToTime(date, berlin)
106+
const localTime = convertDateToTime(date)
108107
// Returns {
109108
// year, month, day, hours, minutes, seconds, milliseconds,
110109
// dayOfWeek, epoch,

0 commit comments

Comments
 (0)