开发者

Any C# SmartDate converters out there, e.g. "sun 11" --> 2009-12-06 11:00:00

In the spirit of not reinventing the wheel, can anyone point me to free C# code that does the following kinds of conversions?

  • "sun" --> 2009-12-06 00:00:00
  • "tom" -开发者_运维知识库-> 2009-12-06 00:00:00
  • "tomorrow" --> 2009-12-06 00:00:00
  • "mon 8pm" --> 2009-12-07 20:00:00
  • "jan 5 at 10" --> 2010-01-05 10:00:00

and durations that return two datetimes like this:

  • "jan 5, 8pm to 10" --> 2010-01-05 20:00:00, 2010-01-05 22:00:00

the point is for developers to have a library which allows users to enter in upcoming dates in their own terms so that if you want to type in that you want to get a task done on "Friday" you just have to type "fri" and the computer knows what you mean.


If your users are actually people sitting behind a browser, than this library might be just what you are looking for: www.datejs.com

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜