mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
add possibility to add whole iso date as date pattern, #1496
This commit is contained in:
parent
f8936f3bc8
commit
a1b2e22ba5
@ -39,6 +39,7 @@ const BUILTIN_ATTRIBUTES = [
|
|||||||
{ type: 'label', name: 'workspaceTabBackgroundColor' },
|
{ type: 'label', name: 'workspaceTabBackgroundColor' },
|
||||||
{ type: 'label', name: 'searchHome' },
|
{ type: 'label', name: 'searchHome' },
|
||||||
{ type: 'label', name: 'sqlConsoleHome' },
|
{ type: 'label', name: 'sqlConsoleHome' },
|
||||||
|
{ type: 'label', name: 'datePattern' },
|
||||||
|
|
||||||
// relation names
|
// relation names
|
||||||
{ type: 'relation', name: 'runOnNoteCreation', isDangerous: true },
|
{ type: 'relation', name: 'runOnNoteCreation', isDangerous: true },
|
||||||
|
@ -141,6 +141,7 @@ function getDateNoteTitle(rootNote, dayNumber, dateObj) {
|
|||||||
|
|
||||||
return pattern
|
return pattern
|
||||||
.replace(/{dayInMonthPadded}/g, dayNumber)
|
.replace(/{dayInMonthPadded}/g, dayNumber)
|
||||||
|
.replace(/{isoDate}/g, dateUtils.localNowDate())
|
||||||
.replace(/{weekDay}/g, weekDay)
|
.replace(/{weekDay}/g, weekDay)
|
||||||
.replace(/{weekDay3}/g, weekDay.substr(0, 3))
|
.replace(/{weekDay3}/g, weekDay.substr(0, 3))
|
||||||
.replace(/{weekDay2}/g, weekDay.substr(0, 2));
|
.replace(/{weekDay2}/g, weekDay.substr(0, 2));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user