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
I'm trying to parse a time in korean using the format a hh:mm:ss but seems like dayjs translate it always as AM.
a hh:mm:ss
import './style.css'; import dayjs from 'dayjs'; import customParseFormat from 'dayjs/plugin/customParseFormat'; import 'dayjs/locale/ko'; dayjs.extend(customParseFormat); dayjs.locale('ko'); const dateAM = dayjs('오전 04:00:00', 'a hh:mm:ss'); console.log('Parsed hour 24h format AM', dateAM.hour()); // => Parsed hour 24h format AM: 4 console.log('Reformatted parsed data AM', dateAM.format('a hh:mm:ss')); // => Reformatted parsed data AM: 오전 04:00:00 const datePM = dayjs('오후 04:00:00', 'a hh:mm:ss'); console.log('Parsed hour 24h format PM', datePM.hour()); // => Parsed hour 24h format PM: 4 console.log('Reformatted parsed data PM', datePM.format('a hh:mm:ss')); // => Reformatted parsed data PM: 오전 04:00:00
Link to a stackblitz with an example: https://stackblitz.com/edit/dayjs-playground-euzysg?file=index.js
Expected behavior When passing the PM time to dayjs, it should parse correctly, so for example:
const datePM = dayjs('오후 04:00:00', 'a hh:mm:ss'); console.log('Parsed hour 24h format PM', datePM.hour()); // => Parsed hour 24h format PM: 16 console.log('Reformatted parsed data PM', datePM.format('a hh:mm:ss')); // => Reformatted parsed data PM: 오후 04:00:00
Information
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm trying to parse a time in korean using the format
a hh:mm:ss
but seems like dayjs translate it always as AM.Link to a stackblitz with an example: https://stackblitz.com/edit/dayjs-playground-euzysg?file=index.js
Expected behavior
When passing the PM time to dayjs, it should parse correctly, so for example:
Information
The text was updated successfully, but these errors were encountered: