mirror of
https://github.com/denoland/deno.git
synced 2024-12-23 15:49:44 -05:00
docs(std/datetime): fix readme example (#9120)
This commit is contained in:
parent
03bf2fc01f
commit
ad21ac3115
1 changed files with 2 additions and 2 deletions
|
@ -39,11 +39,11 @@ are supported:
|
||||||
Takes an input `string` and a `formatString` to parse to a `date`.
|
Takes an input `string` and a `formatString` to parse to a `date`.
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
import { parse } from 'https://deno.land/std@0.69.0/datetime/mod.ts'
|
import { parse } from 'https://deno.land/std@$STD_VERSION/datetime/mod.ts'
|
||||||
|
|
||||||
parse("20-01-2019", "dd-MM-yyyy") // output : new Date(2019, 0, 20)
|
parse("20-01-2019", "dd-MM-yyyy") // output : new Date(2019, 0, 20)
|
||||||
parse("2019-01-20", "yyyy-MM-dd") // output : new Date(2019, 0, 20)
|
parse("2019-01-20", "yyyy-MM-dd") // output : new Date(2019, 0, 20)
|
||||||
parse("2019-01-20", "dd.MM.yyyy") // output : new Date(2019, 0, 20)
|
parse("20.01.2019", "dd.MM.yyyy") // output : new Date(2019, 0, 20)
|
||||||
parse("01-20-2019 16:34", "MM-dd-yyyy HH:mm") // output : new Date(2019, 0, 20, 16, 34)
|
parse("01-20-2019 16:34", "MM-dd-yyyy HH:mm") // output : new Date(2019, 0, 20, 16, 34)
|
||||||
parse("01-20-2019 04:34 PM", "MM-dd-yyyy hh:mm a") // output : new Date(2019, 0, 20, 16, 34)
|
parse("01-20-2019 04:34 PM", "MM-dd-yyyy hh:mm a") // output : new Date(2019, 0, 20, 16, 34)
|
||||||
parse("16:34 01-20-2019", "HH:mm MM-dd-yyyy") // output : new Date(2019, 0, 20, 16, 34)
|
parse("16:34 01-20-2019", "HH:mm MM-dd-yyyy") // output : new Date(2019, 0, 20, 16, 34)
|
||||||
|
|
Loading…
Reference in a new issue