[CSHARP-275] Make Date constructor notation in JsonReader accept the same string representations for a Date as JavaScript does Created: 21/Jul/11  Updated: 02/Apr/15  Resolved: 13/Oct/11

Status: Closed
Project: C# Driver
Component/s: None
Affects Version/s: 1.1
Fix Version/s: 1.3

Type: Improvement Priority: Minor - P4
Reporter: Robert Stam Assignee: Robert Stam
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Right now when parsing "new Date(stringValue)" JsonReader assumes that stringValue can be parsed by .NET's DateTime.Parse method. But JavaScript supports some string representations that .NET does not. Research exactly what JavaScript supports and make JsonReader support all the valid forms.



 Comments   
Comment by Robert Stam [ 13/Oct/11 ]

JsonReader can now parse RFC 822 date strings passed to new Date(). Apparently JavaScript is even more forgiving than RFC 822, but I haven't been able to find a definition of what DateTime strings JavaScript supports other than references to RFC 822 and ISO 8601.

Generated at Wed Feb 07 21:36:21 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.