mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 14:17:22 +01:00
Fix content end date if already in new year (#15376)
* Fix content end date if already in new year * fix test
This commit is contained in:
@@ -895,7 +895,9 @@ function makeEndDate (checkedDate, matcher) {
|
||||
end.minute(0);
|
||||
end.second(0);
|
||||
if (matcher.endMonth !== undefined) {
|
||||
if (matcher.startMonth && matcher.startMonth > matcher.endMonth) {
|
||||
if (matcher.startMonth
|
||||
&& matcher.startMonth > matcher.endMonth
|
||||
&& checkedDate.getMonth() > matcher.endMonth) {
|
||||
end.year(checkedDate.getFullYear() + 1);
|
||||
}
|
||||
end.month(matcher.endMonth);
|
||||
|
||||
Reference in New Issue
Block a user