You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
now I'm trying to run the following "matches" function:
console.log(cal.matches(newDate("12/03/2017 13:15:15")));// true - exactly 3 weeksconsole.log(cal.matches(newDate("12/04/2017 13:15:15")));// false - 3 weeks and a day
The problem I noticed is that the diff dates logic considering only the start date and not the actual week -
also noticed that you solve this problem with days by floor the result
if(type=='days'){// if we are dealing with days, we deal with whole days only.diff=parseInt(diff);}
In addition, flooring the diff of the weeks will cause other problems as following (assuming that we floor the diff) :
letcal=moment(newDate("11/12/2017")).recur().every(3).weeks();console.log(cal.matches(newDate("12/03/2017 13:15:15")));// trueconsole.log(cal.matches(newDate("12/04/2017 13:15:15")));// also true :-|
Can you suggest any solution?
Thanks,
Barak
The text was updated successfully, but these errors were encountered:
Hey!
I'm trying to create a recurrence that will handle event that for example occurs on Sunday and Monday every three weeks with this definition:
now I'm trying to run the following "matches" function:
The problem I noticed is that the diff dates logic considering only the start date and not the actual week -
also noticed that you solve this problem with days by floor the result
In addition, flooring the diff of the weeks will cause other problems as following (assuming that we floor the diff) :
Can you suggest any solution?
Thanks,
Barak
The text was updated successfully, but these errors were encountered: