vapor-community / node

A formatted data encapsulation meant to facilitate the transformation from one object to another
MIT License
25 stars 20 forks source link

Update Date+Convertible.swift #85

Closed ldamman closed 7 years ago

ldamman commented 7 years ago

The milliseconds here are causing Swift 4's json decoding to break when using decoder.dateDecodingStrategy = .iso8601. Note: I don't see any mention of milliseconds on iso8601's wikipedia page. https://en.wikipedia.org/wiki/ISO_8601

Opening PR for discussion.

vzsg commented 7 years ago

Look for "decimal fractions" on the wiki page. It's there.

If milliseconds cause Swift 4 to barf, it's an issue on their side that hopefully can be resolved before the final release...

ldamman commented 7 years ago

Fair enough. I'll close this out. Thanks, @vzsg.