Elwig: Add BackupService
Test / Run tests (push) Successful in 2m48s

This commit is contained in:
2026-08-26 10:39:50 +02:00
parent 163fe0fac8
commit ca5b719630
12 changed files with 267 additions and 84 deletions
+8
View File
@@ -1,6 +1,7 @@
using Microsoft.Data.Sqlite;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.IO.Compression;
using System.IO.Hashing;
@@ -171,5 +172,12 @@ namespace Elwig.Helpers {
grid.Children.Add(tb);
}
public static (int Year, int Week) GetYearAndWeek(this DateTime date) {
return (ISOWeek.GetYear(date), ISOWeek.GetWeekOfYear(date));
}
public static (int Year, int Tertial) GetYearAndTertial(this DateTime date) {
return (date.Month <= 7 ? date.Year - 1 : date.Year, date.Month == 12 || date.Month <= 3 ? 2 : date.Month <= 7 ? 3 : 1);
}
}
}