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
Only looks at that param as a string or array. So this just silently doesn't work properly. The typescript doesn't give any hints to this because the typing says sending in that format is ok
Expected behavior
Use a { locale, format, utc } should work properly when sent into a customerParseFormat plugin or it should explicitly fail instead of silently failing.
Information
Day.js Version [e.g. v1.0.0]
OS: [e.g. iOS]
Browser [e.g. chrome 62]
Time zone: [e.g. GMT-07:00 DST (Pacific Daylight Time)]
The text was updated successfully, but these errors were encountered:
Describe the bug
The dayjs constructor takes in an option type as such
export type OptionType = { locale?: string, format?: string, utc?: boolean } | string | string[]
but if you use object format { locale, format, etc} as an input using the
customParseFormat
it doesn't work as expecteddayjs/src/plugin/customParseFormat/index.js
Line 213 in 4aca4b1
Only looks at that param as a string or array. So this just silently doesn't work properly. The typescript doesn't give any hints to this because the typing says sending in that format is ok
Expected behavior
Use a
{ locale, format, utc }
should work properly when sent into a customerParseFormat plugin or it should explicitly fail instead of silently failing.Information
The text was updated successfully, but these errors were encountered: