Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

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

Muhammad Ali4728f14e8ca2
diff --git a/packages/core/src/utils/grouping.js b/packages/core/src/utils/grouping.js
index e3bd1524c..0e8d4affa 100644
--- a/packages/core/src/utils/grouping.js
+++ b/packages/core/src/utils/grouping.js
@@ -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) => {