在javascript中有日期/时间的自然语言解析器吗? [英] Is there a natural language parser for date/times in javascript?

查看:222
本文介绍了在javascript中有日期/时间的自然语言解析器吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

解决方案

SugarJS 支持一些自然语言解析日期和时间。



您可以跳到这里的现场示例: http://sugarjs.com/dates



For例如,它支持以下输入:




  • 明天之后

  • 从星期一起2周

  • 明年5月25日



然后,您可以将结果隐藏为不同的日期格式或使用API进一步操纵日期。


Is there a natural language parser for date/times in javascript?

解决方案

SugarJS supports some natural language parsing of dates and times.

You can jump to the live example here: http://sugarjs.com/dates

For example, it supports the following inputs:

  • the day after tomorrow
  • 2 weeks from monday
  • May 25th of next year

You can then covert the result into different date formats or use the API to further manipulate the date.

这篇关于在javascript中有日期/时间的自然语言解析器吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆