You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
scala> val tests = List(
| "every day at 17:30 on Monday to Friday",
| "every day at 17:30"
| ).zipWithIndex.foreach { t =>
| val (test, run) = t
|
| val current = Scalendar.now
| val millis = test.cron.nextFrom(current)
| println("%d (%s): %s" format(run, test, current))
| println("%d (%s): %s" format(run, test, Scalendar(current.time + millis)))
| }
0 (every day at 17:30 on Monday to Friday): 06/10/2013 17:08:09
0 (every day at 17:30 on Monday to Friday): 06/11/2013 17:30:00
1 (every day at 17:30): 06/10/2013 17:08:09
1 (every day at 17:30): 06/10/2013 17:30:00
Given that 06/10 is a Monday, shouldn't the .nextFrom(current) for the example "0" above actually return 06/10/2013 17:30:00?
If you look at example "1" which doesn't specify a day of the week, it's calculated correctly.
The text was updated successfully, but these errors were encountered:
Hi, I'm having this problem with cronish:
Given that 06/10 is a Monday, shouldn't the
.nextFrom(current)
for the example "0" above actually return06/10/2013 17:30:00
?If you look at example "1" which doesn't specify a day of the week, it's calculated correctly.
The text was updated successfully, but these errors were encountered: