You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/en/Plugin.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -87,13 +87,16 @@ dayjs
87
87
.local()
88
88
.format() //2019-03-06T17:11:55+08:00
89
89
dayjs.utc('2018-01-01', 'YYYY-MM-DD') // with CustomParseFormat plugin
90
+
dayjs.utc('2018-01-01', 'YYYY-MM-DD', true) // with CustomParseFormat plugin & Using strict parsing
90
91
```
91
92
92
93
By default, Day.js parses and displays in local time.
93
94
94
95
If you want to parse or display in UTC, you can use `dayjs.utc()` instead of `dayjs()`.
95
96
96
-
#### dayjs.utc `dayjs.utc(dateType?: string | number | Date | Dayjs, format? string)`
97
+
You may specify a boolean for the last argument to use `strict parsing`. Strict parsing requires that the format and input match exactly, including delimiters.
98
+
99
+
#### dayjs.utc `dayjs.utc(dateType?: string | number | Date | Dayjs, format? string, strict?: boolean)`
0 commit comments