Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    A. Alonso Dominguez
    @alonsodomin
    your case is slightly different than the one stated in #73, as the valid outcome for your fist snipped should advance the month field to 7
    I believe this is worth it’s own issue, would you mind creating one?
    A. Alonso Dominguez
    @alonsodomin
    @rleibman just merged #81, which should include a fix for your issue.
    it would be good if you test it from master before I publish a new release.
    Roberto Leibman
    @rleibman
    A bit better, but this is still failing:
        val atBadDate = java.time.LocalDate.parse("2017-06-30")
        val Right(cron) = Cron("4 31 4 ? * *")
        val next = cron.next(atBadDate)
        assert(next.nonEmpty)
    A. Alonso Dominguez
    @alonsodomin
    @rleibman that’s expected
    scala> val next = cron.datePart.next(atBadDate)
    next: Option[java.time.LocalDate] = Some(2017-07-01)
    or at least, it’s by design because the LocalDate does not support updates in time fields
    Roberto Leibman
    @rleibman
    ah, that's odd... so adding .atStartOfDay() should fix it?
    I think I would have assumed that for all date only fields (e.g. LocalDate) the user meant "at start of day". But I can see your point of view as well, since that may be surprising... why allow arguments to next like LocalDate without a time component at all?
    A. Alonso Dominguez
    @alonsodomin
    I agree this behaviour it's a bit surprising, specially considering how much effort the lib makes on ensuring type safety
    truth is that I would be interested in hearing what is the more sensible approach
    whether a type error or make the expression return a LocalDateTime from the LocalDate
    A. Alonso Dominguez
    @alonsodomin
    is in fact an idea that I do like and wouldn't be too hard to do
    in such a case, there is still a question of what type to return? from the sub expressions (time, date)
    in my view, following a similar criteria, they should return LocalTime and LocalDate...
    A. Alonso Dominguez
    @alonsodomin
    @rleibman feel free to create an issue in github with your observations in the matter
    Roberto Leibman
    @rleibman
    I will... Anyway... aside from that, I'm happy with the way it works in your snapshot. Could you add to the scaladocs some info in next and step as to when Option would be None vs Some? It's not clear anywhere in the docs.
    A. Alonso Dominguez
    @alonsodomin
    I will, also I'll try to get 0.4.1 out asap
    Roberto Leibman
    @rleibman
    Thanks!
    A. Alonso Dominguez
    @alonsodomin
    @/all Cron4s 0.4.1 has been released
    Roberto Leibman
    @rleibman
    Yay!
    Dmitry Erokhin
    @Dmitry-Erokhin
    Hello, is there an kind of compatibility modes with different syntaxes (especially original Unix one - no seconds and question marks)?
    A. Alonso Dominguez
    @alonsodomin
    no, there is only one syntax supported right now
    Bárður Viberg Dam
    @bardurdam
    @alonsodomin do you know if the contextual macro expansion issue is being worked on?
    Alex Henning Johannessen
    @ahjohannessen
    @alonsodomin When do you expect to release a version that works with 2.13.0?
    A. Alonso Dominguez
    @alonsodomin
    @/all cron4s for Scala 2.13 has already been released.
    sorry for the being a bit disconnected from this channel