Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
In month note title patterns, replace {isoMonth} with e.g. "2025-03" for March 2025.
Joel Shprentz5f26a503afde
diff --git a/docs/User Guide/User Guide/Advanced Usage/Advanced Showcases/Day Notes.md b/docs/User Guide/User Guide/Advanced Usage/Advanced Showcases/Day Notes.mdindex 87b9bad274..d117ee8a95 100644--- a/docs/User Guide/User Guide/Advanced Usage/Advanced Showcases/Day Notes.md+++ b/docs/User Guide/User Guide/Advanced Usage/Advanced Showcases/Day Notes.md@@ -43,6 +43,7 @@ It's possible to customize the title of generated date notes by defining a `#datIt is also possible to customize the title of generated month notes through the `#monthPattern` attribute, much like `#datePattern`. The options are:+* `{isoDate}` results in an ISO 8061 formatted month (e.g. "2025-03" for March 2025)* `{monthNumberPadded}` results in a number like `09` for September, and `11` for November* `{month}` results in the full month name (e.g. `September` or `October`)* `{shortMonth3}` is replaced with the first 3 letters of the month, e.g. Jan, Feb, etc.@@ -56,4 +57,4 @@ Trilium has some special support for day notes in the form of [backend Script APDay (and year, month) notes are created with a label - e.g. `#dateNote="2018-08-16"` this can then be used by other scripts to add new notes to day note etc.-Journal also has relation `child:child:child:template=Day template` (see \[\[attribute inheritance\]\]) which effectively adds \[\[template\]\] to day notes (grand-grand-grand children of Journal).\ No newline at end of file+Journal also has relation `child:child:child:template=Day template` (see \[\[attribute inheritance\]\]) which effectively adds \[\[template\]\] to day notes (grand-grand-grand children of Journal).diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Advanced Showcases/Day Notes.html b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Advanced Showcases/Day Notes.htmlindex 266223fd54..75ee23976a 100644--- a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Advanced Showcases/Day Notes.html+++ b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Advanced Showcases/Day Notes.html@@ -76,6 +76,8 @@the <code>#monthPattern</code> attribute, much like <code>#datePattern</code>.The options are:</p><ul>+ <li><code>{isoMonth}</code> results in an ISO 8061 formatted month (e.g.+ "2025-03" for March 2025)</li><li><code>{monthNumberPadded}</code> results in a number like <code>09</code> forSeptember, and <code>11</code> for November</li><li><code>{month}</code> results in the full month name (e.g. <code>September</code> or <code>October</code>)</li>@@ -98,4 +100,4 @@</div></body>-</html>\ No newline at end of file+</html>diff --git a/src/services/date_notes.ts b/src/services/date_notes.tsindex 5e8710b86f..1324de89b8 100644--- a/src/services/date_notes.ts+++ b/src/services/date_notes.ts@@ -111,6 +111,7 @@ function getMonthNoteTitle(rootNote: BNote, monthNumber: string, dateObj: Date)return pattern.replace(/{shortMonth3}/g, monthName.slice(0, 3)).replace(/{shortMonth4}/g, monthName.slice(0, 4))+ .replace(/{isoMonth}/g, dateUtils.utcDateStr(dateObj).slice(0, 7)).replace(/{monthNumberPadded}/g, monthNumber).replace(/{month}/g, monthName);}