Whats the best java date recurrence pattern calculator

前端 未结 3 1505
难免孤独
难免孤独 2021-01-12 22:19

Anyone know of a (reliable) date recurrence calculator, we\'re trying to implement something in our app which would allow a schedule to be created, similar to those for recu

相关标签:
3条回答
  • 2021-01-12 22:44

    Check out Quartz, it's a really handy tool:

    http://www.quartz-scheduler.org/

    0 讨论(0)
  • 2021-01-12 22:50

    This is a frequent question on the joda time mailing list and the usual answer is to try RFC 2445. Disclaimer: I have not used it myself.

    0 讨论(0)
  • 2021-01-12 23:00

    Check out Lamma date (I wrote it recently), which is designed to generate dates based on a recurrence pattern.

    For example:

    import static io.lamma.LammaJavaImports.*;
    Dates.from(2010, 1, 1).to(2019, 12, 31).byYears(3).on(Locators.nth(3, FRIDAY).of(FEBRUARY)).build();
    

    will generate the third Friday of February for every 3 years in 2010s

    Output:

    List(2010-02-19, 2013-02-15, 2016-02-19, 2019-02-15)
    
    0 讨论(0)
提交回复
热议问题