mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 10:26:08 +01:00 
			
		
		
		
	padding dates
This commit is contained in:
		| @@ -45,12 +45,16 @@ function parseDate(str) { | ||||
|     } | ||||
| } | ||||
|  | ||||
| function padNum(num) { | ||||
|     return (num <= 9 ? "0" : "") + num; | ||||
| } | ||||
|  | ||||
| function formatTime(date) { | ||||
|     return (date.getHours() <= 9 ? "0" : "") + date.getHours() + ":" + (date.getMinutes() <= 9 ? "0" : "") + date.getMinutes(); | ||||
|     return padNum(date.getHours()) + ":" + padNum(date.getMinutes()); | ||||
| } | ||||
|  | ||||
| function formatDate(date) { | ||||
|     return date.getDate() + ". " + (date.getMonth() + 1) + ". " + date.getFullYear(); | ||||
|     return padNum(date.getDate()) + ". " + padNum(date.getMonth() + 1) + ". " + date.getFullYear(); | ||||
| } | ||||
|  | ||||
| function formatDateTime(date) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user