Reviewed DateFormatter used for date conversion#21
Open
rchampourlier wants to merge 1 commit intodchohfi:masterfrom
Open
Reviewed DateFormatter used for date conversion#21rchampourlier wants to merge 1 commit intodchohfi:masterfrom
rchampourlier wants to merge 1 commit intodchohfi:masterfrom
Conversation
Reviewed how the DateFormatter is created to follow Apple's guidelines and demo implementation provided in this documentation: https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/DataFormatting/Articles/dfDateFormatting10_4.html IMO, it makes more sense not to consider user locale since we generally are parsing dates from a backend API, not user entered data. If we don't do it this way, it seems the dates will be converted using local settings, such as non-Gregorian calendar, AM/PM preferences, etc.
Owner
|
Could you add a property to configuration, so the user can switch between the locales? And if there's no locale use what you've done. |
Owner
|
Btw, nice add :) |
Author
|
Wow, sorry, I completely forgot I hadn't even answered to your comment... I'll have to force myself to get some time to finish this so you can merge it... Again, please excuse me for the delay and thanks for notifying me again! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reviewed how the DateFormatter is created to follow Apple's guidelines and demo implementation provided in this documentation.
IMO, it makes more sense not to consider user locale since we generally are parsing dates from a backend API, not user entered data. If we don't do it this way, it seems the dates will be converted using local settings, such as non-Gregorian calendar, AM/PM preferences, etc.