Closed IlanFrumer closed 8 years ago
I've patched this locally so that today
is a function call (effectively what you've done in #167), which IIRC is only called 5 times by Kalendae.
function today() {
return moment().startOf('day');
}
...
return moment(date).startOf('day').yearDay() >= today().yearDay();
etc.
The added benefit of this is if you're using moment-timezone and you're setting a default timezone this will cover any possible race-conditions where the timezone is set after the today
comparison is performed.
This has been fixed in v0.6
When the date changes (at midnight) it won't update. This is because it only gets initialized once.
Source: https://github.com/ChiperSoft/Kalendae/blob/master/src/moment.ext.js#L19