Skip to content

Commit

Permalink
Merge pull request #1705 from LVMBDV/week-53-fix
Browse files Browse the repository at this point in the history
[api] use week years for week-long ticks
  • Loading branch information
ar2rsawseen committed Jan 22, 2021
2 parents 084ebb1 + dfc7670 commit 5021a90
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/lib/countly.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function getTicksBetween(startTimestamp, endTimestamp) {
dayIt.add(1 + dayIt.daysInMonth() - dayIt.date(), "days");
}
else if (daysLeft >= (7 - dayIt.day()) && dayIt.day() === 1) {
ticks.push(dayIt.format("YYYY.[w]w"));
ticks.push(dayIt.format("gggg.[w]w"));
dayIt.add(8 - dayIt.day(), "days");
}
else {
Expand Down Expand Up @@ -61,7 +61,7 @@ function getTicksCheckBetween(startTimestamp, endTimestamp) {
dayIt.add(1 + dayIt.daysInMonth() - dayIt.date(), "days");
}
else {
ticks.push(dayIt.format("YYYY.[w]w"));
ticks.push(dayIt.format("gggg.[w]w"));
dayIt.add(8 - dayIt.day(), "days");
}
}
Expand Down

0 comments on commit 5021a90

Please sign in to comment.