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

Update later.js #38

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Update later.js #38

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Feb 1, 2014

was failing with test
var newDate = new Date('2014-02-28');
later.schedule({schedules: [{D:[1], M:[2], Y:[2014]},{D_a:[27], D_b:[29], M:[2], Y:[2014]}], exceptions: []}).isValid(newDate);

return !b || a.getTime() > b.getTime(); <-- a is null and so a.getTime() is blowing up

Bills fix is working a treat so far

was failing with test
var newDate = new Date('2014-02-28');
later.schedule({schedules: [{D:[1], M:[2], Y:[2014]},{D_a:[27], D_b:[29], M:[2], Y:[2014]}], exceptions: []}).isValid(newDate);

return !b || a.getTime() > b.getTime();   <-- a is null and so a.getTime() is blowing up

Bills fix is working a treat so far
@@ -763,9 +763,9 @@ later = function() {
}
function compareFn(dir) {
return dir === "next" ? function(a, b) {
return !b || a.getTime() > b.getTime();
return !a ? true : (!b || a.getTime() > b.getTime());

Choose a reason for hiding this comment

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

You'll want to make these changes in schedule.js, around line 338. You can then run 'make' to build later.js and test it.

@ilanbiala
Copy link
Contributor

@oziee can you make these changes?

@niftylettuce
Copy link

Per my work with Bree, I have an updated fork of this package called @breejs/later. See https://github.com/breejs/later if you would like to file this PR there.

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.

3 participants