How can I parse descriptive text to a DateTime object? [closed]

╄→гoц情女王★ 提交于 2019-12-06 07:33:06

问题


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:


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.



来源:https://stackoverflow.com/questions/789439/how-can-i-parse-descriptive-text-to-a-datetime-object

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!