mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 10:26:08 +01:00 
			
		
		
		
	add possibility to add whole iso date as date pattern, #1496
This commit is contained in:
		| @@ -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)); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user