Skip to content

Add ISO8601 time printer to "traits time".#100

Open
dram wants to merge 1 commit intorussellallen:masterfrom
dram:iso-8601-time
Open

Add ISO8601 time printer to "traits time".#100
dram wants to merge 1 commit intorussellallen:masterfrom
dram:iso-8601-time

Conversation

@dram
Copy link
Copy Markdown
Contributor

@dram dram commented Oct 26, 2016

Add ISO8601 time printer printISO8601String and printISO8601StringGMT to traits time.

I use Dart's DateTime API as a reference while implementing this.

@dram
Copy link
Copy Markdown
Contributor Author

dram commented Oct 26, 2016

Please do not merge this PR by now, as I find that I do not format years correctly, will investigate it later.

@dram
Copy link
Copy Markdown
Contributor Author

dram commented Oct 29, 2016

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.

@dram
Copy link
Copy Markdown
Contributor Author

dram commented Oct 29, 2016

Btw, as we can not represent dates that before year 1000 in current Self, so those two methods are not fully tested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant