Skip to content
New issue

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

The pad for zero is wrong for toClock() #668

Closed
libern opened this issue Apr 30, 2019 · 2 comments
Closed

The pad for zero is wrong for toClock() #668

libern opened this issue Apr 30, 2019 · 2 comments
Assignees
Labels
Milestone

Comments

@libern
Copy link

libern commented Apr 30, 2019

The pad for zero is wrong.

26100.toClock()         //   ->   7:15:00

It should be like

07:15:00

According to Apple Foundation Documentation:

public static var pad: DateComponentsFormatter.ZeroFormattingBehavior { get } 

// Off: "1:0:10", On: "01:00:10" 
@malcommac
Copy link
Owner

For some strange reasons padding is not added automatically by the DateComponentsFormatter on the very beginning positional item. I had fixed it manually when necessary.
Thanks for the report.

@libern
Copy link
Author

libern commented May 12, 2019

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants