There is a great need for a Robust DateTime parser library for .NET, prefer C# DateTime.TryParse supports very few formats I know the question has been asked a year ago but with no good answer. There must be good libs out there! Commercial or open source
I looked at noda-time. But blog says it does not do parsing yet
Dates fall into two categories:
Date formats: All the various date formats
- 2011-09-09T20:00:00
- 29 September 2011
- 6 September 2011 7:00pm
- 1/1/2009, 12:00PM
Natural Dates: How a Human would say/write it
- Today
- Tomorrrow
- Mondays, 6PM
- Every Monday, 6PM
- Every Friday
- First Monday of every month
- Last Sunday of the month
- Everyday
- 1st of the Month
You can use the C# Date Time Parser of Sergey Stoyan.
Not sure what you are looking for but I like DateTime.TryParseExact() method.
精彩评论