remove check for startTime < currentTime #3593
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR removes the check for task start time < current time in the
parseScheduleDate
function.With this condition, if an user schedules a task with a time less than current time, the day of the task will be set to the next day.
There are two holes with this logic:
short-syntax.spec.ts
that uses this condition. The tested time is 13:37. It will fail if anyone runs the test after 13:37.There is no need to check for schedule time < current time anyway. The date parser is configured as
forwardDate: true
and the reference date is now (new Date()
). So any input date will be parsed as forward into the future.Issues Resolved
Relates to #3192
Check List