It's just interesting if anyone knows about the open .Net library, which handles dates like the date.js library , which allows you to do things like the following.
Date.today().next().thursday();
Date.today().add(3).days();
Date.today().is().friday();
(3).days().ago();
var n = 6;
n.months().fromNow();
Date.today().set({ day: 15, hour: 8, minute: 30 });
Date.parse('today');
Date.parse('t + 5 d');
Date.parse('next thursday');
Date.parse('February 20th 1973');
Date.parse('Thu, 1 July 2004 22:30:00');
I understand that a DateTime object in .Net already supports some of these functions. I'm particularly interested in the last section of code that parses strings intelligently.
source
share