mirror of
https://github.com/denoland/deno.git
synced 2024-12-22 23:34:47 -05:00
Fixed month reference in documented output of parseDate and parseDateTime function calls (#3859)
This commit is contained in:
parent
4f8a5c0239
commit
77f4df40f3
1 changed files with 4 additions and 4 deletions
|
@ -14,12 +14,12 @@ Simple helper to help parse date strings into `Date`, with additional functions.
|
|||
```ts
|
||||
import { parseDate, parseDateTime } from 'https://deno.land/std/datetime/mod.ts'
|
||||
|
||||
parseDate("03-01-2019", "dd-mm-yyyy") // output : new Date(2019, 1, 3)
|
||||
parseDate("2019-01-03", "yyyy-mm-dd") // output : new Date(2019, 1, 3)
|
||||
parseDate("20-01-2019", "dd-mm-yyyy") // output : new Date(2019, 0, 20)
|
||||
parseDate("2019-01-20", "yyyy-mm-dd") // output : new Date(2019, 0, 20)
|
||||
...
|
||||
|
||||
parseDateTime("01-03-2019 16:34", "mm-dd-yyyy hh:mm") // output : new Date(2019, 1, 3, 16, 34)
|
||||
parseDateTime("16:34 01-03-2019", "hh:mm mm-dd-yyyy") // output : new Date(2019, 1, 3, 16, 34)
|
||||
parseDateTime("01-20-2019 16:34", "mm-dd-yyyy hh:mm") // output : new Date(2019, 0, 20, 16, 34)
|
||||
parseDateTime("16:34 01-20-2019", "hh:mm mm-dd-yyyy") // output : new Date(2019, 0, 20, 16, 34)
|
||||
...
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in a new issue