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 description for Quartz Cron Expression: 0 0 11 L-2 * ? #308

Closed
LennyKarpel opened this issue Dec 30, 2017 · 5 comments
Closed
Milestone

Comments

@LennyKarpel
Copy link

Currently the description returned is 'at 11:00 last day of month'. Should be described as happening at 11:00 two days before the end of the month.

@jmrozanec
Copy link
Owner

@LennyKarpel Thank you for reporting this! May we ask for a PR with a test for this issue? Happy New Year!

@LennyKarpel
Copy link
Author

@jmrozanec Happy New Year to you too !!

I am new this this. How do I create a PR if I cannot create a branch to put the changes on ?

The test would be something like:

@Test
public void testIssue308()
{
    CronDefinition    cronDefinition = CronDefinitionBuilder.instanceDefinitionFor( CronType.QUARTZ );
    CronParser        parser = new CronParser( cronDefinition );
    Cron              quartzCron = parser.parse( "0 0 11 L-2 * ?" );
    CronDescriptor    descriptor = CronDescriptor.instance( Locale.getDefault() );
    String            description = descriptor.describe( quartzCron );

    // not sure what the exact string 'should' be ..

    assertNotEquals( "at 11:00 two days before the last day of month", description);
}

anyway .. hope that helps. Let me know if I can do more.

@Naxos84
Copy link
Contributor

Naxos84 commented Dec 30, 2017 via email

jmrozanec added a commit that referenced this issue Mar 14, 2018
@pangyikhei
Copy link
Contributor

@jmrozanec I can tackle this one.

pangyikhei added a commit to pangyikhei/cron-utils that referenced this issue Oct 27, 2020
jmrozanec added a commit that referenced this issue Oct 27, 2020
@jmrozanec jmrozanec modified the milestones: enhanced-descriptions, next Oct 27, 2020
@jmrozanec
Copy link
Owner

@LennyKarpel @Naxos84 Fixed by @pangyikhei in #458!

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

4 participants