breejs / later

*Maintained fork of Later.* A javascript library for defining recurring schedules and calculating future (or past) occurrences for them. Includes support for using English phrases and Cron schedules. Works in Node and in the browser.
https://breejs.github.io/later/
MIT License
134 stars 13 forks source link

[docs] Text Parser has no 2nd argument "hasSeconds" (only for Cron Parser) #11

Closed bobo96run closed 9 months ago

bobo96run commented 3 years ago

In Parsers documentation, we have: https://breejs.github.io/later/parsers.html#text

later.parse.text(expr, hasSeconds)

Parses the text expression expr and returns a valid schedule that can be used with Later.

but actually parse.text takes only a single argument:

https://github.com/breejs/later/blob/e8d16f333abf52811c3c28bdc416722c86f24185/src/index.js#L1708

The hasSeconds argument only makes sense for parse.cron, which may have an optional seconds component in its expression, which may be difficult to detect automatically, whereas the text parser expects an explicit word for seconds.