开发者

Robust DateTime parser library for .NET [duplicate]

This question already has answers here: Natural language date/time parser for .NET? [closed] (9 answers) 开发者_如何学JAVA Closed 9 years ago.

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜