-
Notifications
You must be signed in to change notification settings - Fork 165
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
Printing and parsing of dates and times #444
Comments
Please don't use "String" (month) as identifier for the unit. Noone can ever get the naming right. Was ist capitalized? Does ms exists as a uni? or was it even ms not MilliSecond? Also i'm always struggling with date formatting since i can NEVER remember what character means what. Was MM minute or Month, or was it the month number or month name? Maybe we could do something with enums here? At least the SHIFTING unit can definitely be done with an enum. Not so sure about the formatting yet. |
@Timmeey we can use |
@yegor256 I would like to contribute to this. |
@svendiedrichsen please, go ahead, but slowly. Don't make big pull requests, since they may get stuck in reviews. |
@yegor256 Sorry for this. But I didn't think of 2 classes and 2 tests being such a big PR. |
@yegor256 Can this be closed now? |
@svendiedrichsen yes, many thanks! |
To be honest, I'm sick of date parsing and printing in Java 8 Date and Time API. How about we create our own object-oriented one at
org.cactoos.time
? Here is how it should work, I believe.Printing:
Parsing:
With time zones:
That's it.
Later, we can create, for example:
The text was updated successfully, but these errors were encountered: