Skip to content

Flutter intl DateFormat.jm() returns 24-hour instead of 12-hour #994

@swulog

Description

@swulog

DateFormat.yMEd("zh_CN").add_jm();

DateFormat.yMEd("zh_CN").add_Hm();

both return 24-hour format,

but changed to "en_US" return right format.

You can test like

print(DateFormat.jm("en").format(DateTime.now()));
print(DateFormat.Hm("en").format(DateTime.now()));

work well

print(DateFormat.jm("zh").format(DateTime.now()));
print(DateFormat.Hm("zh").format(DateTime.now()));

not working

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions