How can I parse descriptive text to a DateTime obj

2019-04-12 02:20发布

Are there any existing libraries in existence that will parse a datetime from a plaintext phrase? I'm looking for something similar to Remember The Milk or Outlook, where the user can enter "next tuesday at 6pm" or "tonight at 7" and the library can spit out {4/28/2009 18:00:00} or {4/25/2009 19:00:00}. I'm considering writing my own, but I'd rather use/contribute to something already in existence.

1条回答
爱情/是我丢掉的垃圾
2楼-- · 2019-04-12 02:42

Datejs is an open-source JavaScript Date Library that does what you're asking for: http://www.datejs.com/

It's not .NET, but it is Open Source.

查看更多
登录 后发表回答