mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
padding dates
This commit is contained in:
parent
d1329de760
commit
f3f453bdbf
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user