Any C # SmartDate converters, such as "sun 11" & # 8594; 2009-12-06 11:00:00

In the spirit of not reinventing the wheel, can someone point me to the free C # code that performs the following types of conversions?

  • "the 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 times, for example:

  • " 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 that allows users to enter upcoming dates in their own terms, so if you want to enter what you want to complete the task on " Friday " you just need to enter " fri " and the computer knows what you have in mind .

+5
source share
1 answer

If your users are actually people sitting at the browser, then this library may be exactly what you are looking for: www.datejs.com

+1
source

All Articles