-
Notifications
You must be signed in to change notification settings - Fork 26
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
NextInstance skips dates #5
Comments
This is by design per the specification. If
Here, |
Cool. I’ll give that a shot. Thanks!
Alicia Gontarek
Senior Developer
From: Eric Woodruff [mailto:notifications@github.com]
Sent: Tuesday, May 02, 2017 3:49 PM
To: EWSoftware/PDI <PDI@noreply.github.com>
Cc: Alicia Gontarek <agontarek@membersolutions.com>; Author <author@noreply.github.com>
Subject: Re: [EWSoftware/PDI] NextInstance skips dates (#5)
This is by design per the specification. If BYxxx rule parts are found that exceed the available scope (in this case Feb 29th in a non-leap year), the instances are ignored. To handle this, you can use the BYSETPOS rule to get the last occurrence that falls on either the 28th or 29th. For example:
FREQ=MONTHLY;INTERVAL=9;BYMONTHDAY=28,29;BYSETPOS=-1
Here, BYMONTHDAY=28,29 computes the 28th and 29th at the given monthly interval and BYSETPOS=-1 limits it to the last in the set. For February of non-leap years, that will be the 28th and for all other months, it will be the 29th.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#5 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/Aa_4INpjuVy9Vn2bD0smFVVbioFfsIgtks5r14jBgaJpZM4NOdK1>.
|
If a start date is on the 29th and the NextInstance falls in Feb (based on frequency), that month will be skipped if not a Leap Year. For example, start date is 5/29/17, frequency is 9 months, the next instance displayed is 11/29/18. It also does this if the start date is 2/29 and frequency is yearly, it will only return the leap years. I was able to work around this by setting a ByMonthDay -1 for that scenario, but monthly frequency is more difficult.
The text was updated successfully, but these errors were encountered: