Add ISO8601 time printer to "traits time".#100
Open
dram wants to merge 1 commit intorussellallen:masterfrom
Open
Add ISO8601 time printer to "traits time".#100dram wants to merge 1 commit intorussellallen:masterfrom
dram wants to merge 1 commit intorussellallen:masterfrom
Conversation
Contributor Author
| Please do not merge this PR by now, as I find that I do not format years correctly, will investigate it later. |
Contributor Author
| Found that in Python year of a datetime object is restricted to between 1 and 9999, and format of calendar dates with year <1 or >10000 is not quite clear in Wikipedia, so currently I only consider formatting for year >=1 and <=9999. This PR is ready to be considered to be merged now, of course we can improve it in the future when we get 64-bit time. |
Contributor Author
| Btw, as we can not represent dates that before year 1000 in current Self, so those two methods are not fully tested. |
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.
Add ISO8601 time printer
printISO8601StringandprintISO8601StringGMTtotraits time.I use Dart's DateTime API as a reference while implementing this.