-
Notifications
You must be signed in to change notification settings - Fork 89
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
Exceptions #78
Comments
What format are the dates in the exception array in? If they do not contain time information set to 0:00:00, then they will not match correctly, and therefore not be considered an exception. Note: It's not recommended to create a recurrence using that format - usually you would only do so when importing rules that were exported with the export function. Also, we should add support for passing arrays to the except function, as well as ensuring that the isException function removes any time information from its dates before trying to match them. |
Its not my code. Previous developer seems to have written the following code:
what format is needed for exceptions?
|
I apologize, it's been a little while since I've worked deeply on this project; my last comment is untrue - moment-recur is already stripping the time information away from exception dates, so that would not be the issue. It's hard to say what your issue is without an example using some actual dates that are being passed. I've tested my example and it skips 01/05/2014 as expected, so nothing appears to be broken. I've attempted to recreate the code you provided with some actual values and run it, and it still works as expected: https://jsfiddle.net/22tq3d3r/ Also note, for Uc, there is no reason to format the moment and convert it to a string - you can simply pass the moment |
Hi,
sadly a programmer used this library to create some dates :( His code looks like this:
Oc is an array of dates. I expected to get the next 6 days without the dates from the exceptions... however it just gives me the next 6 dates. Is this a bug or a feature?
The text was updated successfully, but these errors were encountered: