strtotime equivalent in .NET

后端 未结 6 1190
春和景丽
春和景丽 2020-12-06 08:04

Is there an equivalent of PHP\'s strtotime() function working on .NET Framework. I\'m talking about it\'s capacity to handle strings likes:

  • strtot
6条回答
  •  天涯浪人
    2020-12-06 08:33

    I think the 'correct' answer here is to use something like https://github.com/robertwilczynski/nChronic. It's a port of the Ruby equivalent and can parse a wide range of date time formats, as listed here: http://chronic.rubyforge.org/ in the 'Examples' section (scroll down).

提交回复
热议问题