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

前端 未结 5 2114
抹茶落季
抹茶落季 2020-12-03 10:16

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

5条回答
  •  无人及你
    2020-12-03 10:37

    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.

提交回复
热议问题