Skip to content

Commit

Permalink
added comments to _calculatePreviousRun function croner.js
Browse files Browse the repository at this point in the history
  • Loading branch information
buzzinJohnnyBoi authored and Hexagon committed May 18, 2024
1 parent 5e85325 commit 521d4da
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 3 deletions.
3 changes: 3 additions & 0 deletions dist/croner.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions dist/croner.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/croner.min.cjs.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/croner.min.js.map

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions dist/croner.umd.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/croner.umd.min.js.map

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions src/croner.js
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,9 @@ Cron.prototype._next = function (prev) {
* This calculation is only necessary if the startAt time is before the current time.
* Should only be called from the _next function.
* @private
* @param {CronDate|Date|string|undefined} prev - previousRun
* @param {boolean} hasPreviousRun - has a previous run
* @returns {[{CronDate | undefined}, {boolean}]} - previousRun, hasPreviousRun
**/
Cron.prototype._calculatePreviousRun = function (prev, hasPreviousRun) {
const now = new CronDate(undefined, this.options.timezone || this.options.utcOffset);
Expand Down

0 comments on commit 521d4da

Please sign in to comment.