Skip to content

Three-letter month format #246

Description

@vahida1157

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions