We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
customParseFormat
a
A
Describe the bug
Example
import dayjs from "dayjs"; import customParseFormat from "dayjs/plugin/customParseFormat.js"; dayjs.extend(customParseFormat); console.log( dayjs("May 17, 2021 12:00pm", "MMMM D, YYYY H:mma", true).isValid() ); // true console.log( dayjs("May 17, 2021 1:00pm", "MMMM D, YYYY H:mma", true).isValid() ); // false
I can paste the console.log statements into the developer tools console on https://day.js.org/ and get the same result.
console.log
Expected behavior
Parsing am/pm with a and AM/PM with A should set the hours offset as expected.
am
pm
AM
PM
Information
The text was updated successfully, but these errors were encountered:
The problem is the comma in the date / format string; dayjs cannot handle this. PR #1913 should fix that
Sorry, something went wrong.
No branches or pull requests
Describe the bug
Example
I can paste the
console.log
statements into the developer tools console on https://day.js.org/ and get the same result.Expected behavior
Parsing
am
/pm
witha
andAM
/PM
withA
should set the hours offset as expected.Information
The text was updated successfully, but these errors were encountered: