Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

date formats #34

Open
hjvdwijk opened this issue Aug 15, 2013 · 3 comments
Open

date formats #34

hjvdwijk opened this issue Aug 15, 2013 · 3 comments

Comments

@hjvdwijk
Copy link

Hi,

The library works very well. I had to make a tiny adjustment and added 2 date formats. Web.API converts SQL datetime and DateTime.Now in a string format that currently is not recognized. The following datatime format fixed this problem

    private static readonly string[] Iso8601Format = new string[]
                                                         {   @"yyyy-MM-dd\THH:mm:ss.FFFFFFFK",
                                                             @"yyyy-MM-dd\THH:mm:ss.FFFFFFF\Z",
                                                             @"yyyy-MM-dd\THH:mm:ss\Z",
                                                             @"yyyy-MM-dd\THH:mm:ssK",
                                                             @"yyyy-MM-dd\THH:mm:ss.FFFFFFF"
                                                         };
@prabirshrestha
Copy link
Member

Would you mind sending a PR with unit tests.
Note: We will only merge the formats that confirms with ISO8601 format.

@Esam-Bustaty
Copy link

I think we also need the format yyyy-MM-dd which is allowed in ISO8601 as calendar date (date only).

@prabirshrestha
Copy link
Member

@Esam-Bustaty feel free to send a PR with tests.

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

No branches or pull requests

3 participants