Skip to content

Build your personal knowledge base with Trilium Notes

feat: add new datePattern replacers for shortmonth * `{shortMonth3}` 3-letter months, e.g. Sep, Oct, Nov, Dec * `{shortMonth4}` 4-letter months, e.g. Sept, Octo, Nove, Dece

Compositr542e2579dfd5
diff --git a/src/services/date_notes.js b/src/services/date_notes.js
index 520796c295..7bebe0eb3b 100644
--- a/src/services/date_notes.js
+++ b/src/services/date_notes.js
@@ -105,6 +105,8 @@ function getMonthNoteTitle(rootNote, monthNumber, dateObj) {
const monthName = MONTHS[dateObj.getMonth()];
return pattern
+ .replace(/{shortMonth3}/g, monthName.slice(0,3))
+ .replace(/{shortMonth4}/g, monthName.slice(0,4))
.replace(/{monthNumberPadded}/g, monthNumber)
.replace(/{month}/g, monthName);
}