Skip to content
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

Invalid date checks #62

Closed
wants to merge 3 commits into from
Closed

Invalid date checks #62

wants to merge 3 commits into from

Conversation

aramk
Copy link
Contributor

@aramk aramk commented Jul 28, 2014

Firstly, this is a very useful library! I ran into an issue where I incorrectly parsed a date and passed it into between(), which caused an infinite loop since it treated the date similar to undefined. While we may expect the iterator to be called indefinitely (until we return a falsy result) when we provide a falsy before date, it's likely an error on our part if we pass in an Invalid Date. I've added a check in init() to fail on that along with some tests. I also added two small methods for checking if an object is a date and whether it's valid.

lib/rrule.js Outdated
return date instanceof Date;
},

isValid: function (date) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a better name would be isValidDate()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

aramk added 3 commits May 1, 2015 22:22
# By Linquize (2) and others
# Via Jakub Roztočil (4) and Jakub Roztocil (2)
* 'master' of https://github.com/jakubroztocil/rrule:
  Undo jkbrzt#91 as it was breaking the demo app
  Allow Negative and 2-Digit Values in Demo
  Bugfix
  Fix typo
  Do not hang if interval is 0 or not a number
  Updating script location in Bower, fixes jkbrzt#61.
@arolson101
Copy link
Collaborator

Hi! I'm trying to clear out bugs and PRs. If this PR is still wanted/relevant, please comment and/or fix the conflicts!

@davidgoli
Copy link
Collaborator

This PR is too out of date to merge at this point, however, the functionality is still welcome in a new PR!

@davidgoli davidgoli closed this Sep 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants