未验证 提交 77f4df40 编写于 作者: C Chris Knight 提交者: GitHub

Fixed month reference in documented output of parseDate and parseDateTime function calls (#3859)

上级 4f8a5c02
......@@ -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)
...
```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册