Skip to content

Question about date formatting with AM/PM and format set to h:mm a #736

@kazuooooo

Description

@kazuooooo

Hi, thank you for building very useful Library 😊

I noticed toFormat method is little bit strange.
Code to reproduce here.

let a = "2020-05-20 00:00:00".toDate()
print(a?.toFormat("h:mm a")) // => Optional("12:00 AM")

It looks h and a are inconsistent.

I think it should be 12:00 PM or 0:00 AM.
I am happy if you can help me 🙏

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions