Skip to content

fix YYYY formatting #23

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

Merged
merged 1 commit into from
Jul 11, 2017
Merged

fix YYYY formatting #23

merged 1 commit into from
Jul 11, 2017

Conversation

safareli
Copy link
Contributor

@safareli safareli commented Jul 7, 2017

No description provided.

@cryogenian
Copy link
Member

LGTM, what's the way of formatting years as is, I.e. 19 -> 19? I didn't see 0019 before

@safareli
Copy link
Contributor Author

safareli commented Jul 8, 2017

what's the way of formatting years as is, I.e. 19 -> 19

I guess YearAbsolute.

I didn't see 0019 before

motivation behind this pr is that when we have format YYYY (YearFull) and we parse we expect to have 4 digits in input string. but when we format, we can't parse it again as parser expects 4 digits to be present. alternative option will be to not require 4 digits:

- (parseInt 4 exactLength "Incorrect full year")
+ (parseInt 4 empty "Incorrect full year")

I.e. don't ask for exact 4 digits and parse up to 4 digits (now I think it will be much better).

Will close this and open another pr to remove exactLength from year parser

@safareli safareli closed this Jul 8, 2017
@safareli safareli deleted the year branch July 11, 2017 16:49
@safareli safareli mentioned this pull request Jul 11, 2017
@safareli safareli restored the year branch July 11, 2017 16:57
@safareli safareli reopened this Jul 11, 2017
@safareli
Copy link
Contributor Author

#24 (comment)

@cryogenian Approve if you like and will merge then.

@safareli safareli merged commit 1b7bdab into purescript-contrib:master Jul 11, 2017
@safareli safareli deleted the year branch July 11, 2017 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants