Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect last execution time for fixed month #65

Closed
Joao-Neves opened this issue Jan 8, 2016 · 2 comments
Closed

Incorrect last execution time for fixed month #65

Joao-Neves opened this issue Jan 8, 2016 · 2 comments
Assignees

Comments

@Joao-Neves
Copy link

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.

@jmrozanec
Copy link
Owner

@Joao-Neves thank you for reporting this!

@jmrozanec
Copy link
Owner

@Joao-Neves Fixed!

@jmrozanec jmrozanec added done and removed help wanted labels Mar 6, 2016
@jmrozanec jmrozanec self-assigned this Mar 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants