Skip to content

Commit

Permalink
docs(readme): update nextDates documentation (#702)
Browse files Browse the repository at this point in the history
  • Loading branch information
sheerlox authored Oct 12, 2023
1 parent 141aa00 commit 1ad2e22
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ For day-of-week indexing, we only added support for `7` as Sunday, so you don't

- **constructor no longer accepts an object as its first and only params. Use `CronJob.from(argsObject)` instead.**
- **callbacks are now called in the order they were registered.**
- **`nextDates(count?: number)` now always returns an array (empty if no argument is provided). Use `nextDate()` instead for a single date.**

### Removed methods

Expand Down Expand Up @@ -131,7 +132,8 @@ Parameter Based
- `setTime` - Stops and changes the time for the `CronJob`. Param must be a `CronTime`.
- `lastDate` - Tells you the last execution date.
- `nextDate` - Provides the next date that will trigger an `onTick`.
- `nextDates` - Provides an array of the next set of dates that will trigger an `onTick`.
- `nextDates(count)` - Provides an array of the next set of dates that will trigger an `onTick`.
- `count` - [OPTIONAL] - The number of next dates to return. Defaults to 0, returning an empty array.
- `fireOnTick` - Allows you to override the `onTick` calling behavior. This matters so only do this if you have a really good reason to do so.
- `addCallback` - Allows you to add `onTick` callbacks. Callbacks are run in the order they are registered.
- `CronTime`
Expand Down

0 comments on commit 1ad2e22

Please sign in to comment.