You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 24, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: docs/User Guide/User Guide/Advanced Usage/Advanced Showcases/Day Notes.md
+54-11Lines changed: 54 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,48 +13,91 @@ This pattern works well also because of [Cloning Notes](../../Basic%20Concepts%2
13
13
14
14

15
15
16
-
You can see the structure of day notes appearing under "Journal" note - there's a note for the whole year 2017, under it, you have "12 - December" which then contains "18 - Monday". This is our "day note" which contains some text in its content and also has some child notes (some of them are from [Task manager](Task%20Manager.md)).
16
+
You can see the structure of day notes appearing under "Journal" note - there's a note for the whole year 2025, under it, you have "03 - March" which then contains "09 - Monday". This is our "day note" which contains some text in its content and also has some child notes (some of them are from [Task manager](Task%20Manager.md)).
17
17
18
18
You can also notice how this day note has [promoted attribute](../Attributes/Promoted%20Attributes.md) "weight" where you can track your daily weight. This data is then used in [Weight tracker](Weight%20Tracker.md).
19
19
20
+
## Week Note and Quarter Note
21
+
22
+
Week and quarter notes are disabled by default, since it might be too much for some people. To enable them, you need to set `#enableWeekNotes` and `#enableQuarterNotes` attributes on the root calendar note, which is identified by `#calendarRoot` label. Week note is affected by the first week of year option. Be careful when you already have some week notes created, it will not automatically change the existing week notes and might lead to some duplicates.
23
+
20
24
## Templates
21
25
22
26
Trilium provides [template](../Templates.md) functionality, and it could be used together with day notes.
23
27
24
28
You can define one of the following relations on the root of the journal (identified by `#calendarRoot` label):
25
29
26
30
* yearTemplate
31
+
* quarterTemplate (if `#enableQuarterNotes` is set)
27
32
* monthTemplate
33
+
* weekTemplate (if `#enableWeekNotes` is set)
28
34
* dateTemplate
29
35
30
36
All of these are relations. When Trilium creates a new note for year or month or date, it will take a look at the root and attach a corresponding `~template` relation to the newly created role. Using this, you can e.g. create your daily template with e.g. checkboxes for daily routine etc.
31
37
32
-
## Date pattern
38
+
## Naming pattern
39
+
40
+
You can customize the title of generated journal notes by defining a `#datePattern`, `#weekPattern`, `#monthPattern`, `#quarterPattern` and `#yearPattern` attribute on a root calendar note (identified by `#calendarRoot` label). The naming pattern replacements follow a level-up compatibility - each level can use replacements from itself and all levels above it. For example, `#monthPattern` can use month, quarter and year replacements, while `#weekPattern` can use week, month, quarter and year replacements. But it is not possible to use week replacements in `#monthPattern`.
33
41
34
-
It's possible to customize the title of generated date notes by defining a `#datePattern` label on a root calendar note (identified by `#calendarRoot` label). Following are possible values:
42
+
### Date pattern
35
43
36
-
*`{dayInMonthPadded} - {weekDay}` day notes are named e.g. "24 - Monday"
37
-
*`{dayInMonthPadded}: {weekDay3}` day notes are named e.g. "24: Mon"
38
-
*`{dayInMonthPadded}: {weekDay2}` day notes are named e.g. "24: Mo"
39
-
*`{isoDate} - {weekDay}` day notes are named e.g. "2020-12-24 - Monday"
44
+
It's possible to customize the title of generated date notes by defining a `#datePattern` attribute on a root calendar note (identified by `#calendarRoot` label). Following are possible values:
45
+
46
+
*`{isoDate}` results in an ISO 8061 formatted date (e.g. "2025-03-09" for March 9, 2025)
47
+
*`{dateNumber}` results in a number like `9` for the 9th day of the month, `11` for the 11th day of the month
48
+
*`{dateNumberPadded}` results in a number like `09` for the 9th day of the month, `11` for the 11th day of the month
40
49
*`{ordinal}` is replaced with the ordinal date (e.g. 1st, 2nd, 3rd) etc.
50
+
*`{weekDay}` results in the full day name (e.g. `Monday`)
51
+
*`{weekDay3}` is replaced with the first 3 letters of the day, e.g. Mon, Tue, etc.
52
+
*`{weekDay2}` is replaced with the first 2 letters of the day, e.g. Mo, Tu, etc.
53
+
54
+
The default is `{dateNumberPadded} - {weekDay}`
55
+
56
+
### Week pattern
57
+
58
+
It is also possible to customize the title of generated week notes through the `#weekPattern` attribute on the root calendar note. The options are:
59
+
60
+
*`{weekNumber}` results in a number like `9` for the 9th week of the year, `11` for the 11th week of the year
61
+
*`{weekNumberPadded}` results in a number like `09` for the 9th week of the year, `11` for the 11th week of the year
62
+
*`{shortWeek}` results in a short week string like `W9` for the 9th week of the year, `W11` for the 11th week of the year
63
+
*`{shortWeek3}` results in a short week string like `W09` for the 9th week of the year, `W11` for the 11th week of the year
64
+
65
+
The default is `Week {weekNumber}`
41
66
42
-
## Month pattern
67
+
###Month pattern
43
68
44
-
It is also possible to customize the title of generated month notes through the `#monthPattern` attribute, much like `#datePattern`. The options are:
69
+
It is also possible to customize the title of generated month notes through the `#monthPattern` attribute on the root calendar note. The options are:
45
70
46
71
*`{isoMonth}` results in an ISO 8061 formatted month (e.g. "2025-03" for March 2025)
72
+
*`{monthNumber}` results in a number like `9` for September, and `11` for November
47
73
*`{monthNumberPadded}` results in a number like `09` for September, and `11` for November
48
74
*`{month}` results in the full month name (e.g. `September` or `October`)
49
75
*`{shortMonth3}` is replaced with the first 3 letters of the month, e.g. Jan, Feb, etc.
50
76
*`{shortMonth4}` is replaced with the first 4 letters of the month, e.g. Sept, Octo, etc.
51
77
52
78
The default is `{monthNumberPadded} - {month}`
53
79
80
+
### Quarter pattern
81
+
82
+
It is also possible to customize the title of generated quarter notes through the `#quarterPattern` attribute on the root calendar note. The options are:
83
+
84
+
*`{quarterNumber}` results in a number like `1` for the 1st quarter of the year
85
+
*`{shortQuarter}` results in a short quarter string like `Q1` for the 1st quarter of the year
86
+
87
+
The default is `Quarter {quarterNumber}`
88
+
89
+
### Year pattern
90
+
91
+
It is also possible to customize the title of generated year notes through the `#yearPattern` attribute on the root calendar note. The options are:
92
+
93
+
*`{year}` results in the full year (e.g. `2025`)
94
+
95
+
The default is `{year}`
96
+
54
97
## Implementation
55
98
56
99
Trilium has some special support for day notes in the form of [backend Script API](https://triliumnext.github.io/Notes/backend_api/BackendScriptApi.html) - see e.g. getDayNote() function.
57
100
58
-
Day (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.
101
+
Day (and year, month) notes are created with a label - e.g. `#dateNote="2025-03-09"` this can then be used by other scripts to add new notes to day note etc.
59
102
60
-
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).
103
+
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). Please note that, when you enable week notes or quarter notes, it will not automatically change the relation for the child level.
0 commit comments