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

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

问题描述

javascript 中是否有用于日期/时间的自然语言解析器?

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

推荐答案

SugarJS 支持一些自然语言解析日期和次.

SugarJS supports some natural language parsing of dates and times.

您可以在此处跳转到现场示例:http://sugarjs.com/dates

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

例如,它支持以下输入:

For example, it supports the following inputs:

  • 后天
  • 从星期一开始 2 周
  • 明年 5 月 25 日

然后您可以将结果转换为不同的日期格式或使用 API 进一步操作日期.

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

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

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