I'm trying to convert this Date format to Jalali: "Jan 11, 2023 4:28:24 PM"
This is my code:
moment("Jan 11, 2023 4:28:24 PM", "MMM DD, YYYY h:mm:ss a").locale("fa-IR").format("jYYYY/jMM/jDD h:mm")
And I get an Invalid date exception.
According to moment js document, the three-letter month (for example "Jan") must use the "MMM" string format, but it's not working.
Note:
The Invalid Date is for the three-letter month, and if I remove it, will be ok.
I'm trying to convert this Date format to Jalali:
"Jan 11, 2023 4:28:24 PM"This is my code:
moment("Jan 11, 2023 4:28:24 PM", "MMM DD, YYYY h:mm:ss a").locale("fa-IR").format("jYYYY/jMM/jDD h:mm")And I get an Invalid date exception.
According to moment js document, the three-letter month (for example "Jan") must use the
"MMM"string format, but it's not working.Note:
The Invalid Date is for the three-letter month, and if I remove it, will be ok.