core: add year when grouping by month (#3630)

This commit is contained in:
Muhammad Ali
2023-10-31 10:57:52 +05:00
committed by GitHub
parent e94b431d58
commit 4728f14e8c

View File

@@ -57,7 +57,7 @@ const KEY_SELECTORS = {
abc: (item) => getFirstCharacter(item.alias || item.title),
month: (item, groupBy, dateNow) => {
dateNow.setTime(item[groupBy]);
return MONTHS_FULL[dateNow.getMonth()];
return `${MONTHS_FULL[dateNow.getMonth()]} ${dateNow.getFullYear()}`;
},
week: (item, groupBy) => getWeekGroupFromTimestamp(item[groupBy]),
year: (item, groupBy, dateNow) => {