Skip to content

Incorrect last execution time for fixed month #65

@Joao-Neves

Description

@Joao-Neves

Last execution time is not being computed correctly for a simple number:

final CronType cronType = CronType.QUARTZ;
final CronParser quartzParser = new CronParser(CronDefinitionBuilder.instanceDefinitionFor(cronType));
ExecutionTime executionTime = ExecutionTime.forCron(quartzParser.parse("0 30 12 1 9 * 2010"));
DateTime lastTime = executionTime.lastExecution(DateTime.now());
assertNotNull(lastTime);
assertEquals(9, lastTime.getMonthOfYear());

Yields:

java.lang.AssertionError: 
Expected :9
Actual   :10

On the last assertion.

This was correct on version 3.1.1 though.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions