sort the days and hours

This commit is contained in:
Girish Ramakrishnan
2025-10-07 14:44:47 +02:00
parent 773435fb7f
commit 15256ebbdf
+2 -1
View File
@@ -49,7 +49,8 @@ function prettyBackupSchedule(pattern) {
const tmp = pattern.split(' ');
if (tmp.length === 1) return pattern.charAt(0).toUpperCase() + pattern.slice(1); // case for 'never' - capitalize
const hours = tmp[2].split(','), days = tmp[5].split(',');
const hours = tmp[2].split(',').sort((a, b) => Number(a) - Number(b));
const days = tmp[5].split(',').sort((a, b) => Number(a) - Number(b));
let prettyDay;
if (days.length === 7 || days[0] === '*') {
prettyDay = 'Everyday';