mirror of
https://github.com/sysadminsmedia/homebox.git
synced 2025-12-24 14:31:55 +01:00
feat: add scheduled maintenance tasks (#320)
* add scheduled maintenance tasks * fix failing typecheck
This commit is contained in:
@@ -5,6 +5,10 @@ export function validDate(dt: Date | string | null | undefined): boolean {
|
||||
|
||||
// If it's a string, try to parse it
|
||||
if (typeof dt === "string") {
|
||||
if (dt.startsWith("0001")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const parsed = new Date(dt);
|
||||
if (isNaN(parsed.getTime())) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user