Affects: 5.3.24
Docs for spring-context org.springframework.scheduling.support.CronExpression#parse says:
In the "day of week" field, L stands for "the last day of the week". If prefixed by a number or three-letter name (i.e. dL or DDDL), it means "the last day of week d (or DDD) in the month".
Looks like it can be used without prefix, but it doesn't and the code throws en exception when there is not prefix before 'L' character. So, the documentation doesn't match the code, and it seems to me that the documentation should be fixed.
Comment From: poutsma
Thanks for spotting this. Using a single L to indicate "last day of week" was allowed in an earlier version of CronExpression
, but we decided to drop this feature thinking it would cause confusion when a cron expression would have a different meaning if deployed in different regions. We just forgot to drop the documentation.
Comment From: tdewolf
@poutsma so only dL or DDDL is supported or did L completely drop for last day of week?
Comment From: poutsma
IIRC, the single L
was only supported in milestones, and dropped before 5.3.0. So it never was supported in any GA release, for reasons explained above.