Is there an equivalent of PHP\'s strtotime()
function working on .NET Framework. I\'m talking about it\'s capacity to handle strings likes:
I think you'll have to write your own method.
"now" is just DateTime.Now
.
"+1 day" would be DateTime.Now.AddDays(1)
for example.
So you'll need to parse your string looking for this type of input and then call the appropriate DateTime
method. The fall-through case would be to pass the string through DateTime.Parse(String, IFormatProvider, DateTimeStyles) with different DateTimeStyles.