diff --git a/resources/js/helpers/datetime.ts b/resources/js/helpers/datetime.ts index a45fc8e..aa88d71 100644 --- a/resources/js/helpers/datetime.ts +++ b/resources/js/helpers/datetime.ts @@ -74,6 +74,7 @@ export class SMDate { { format = "dmy", utc = false } = {} ): SMDate { const now = new Date(); + let time = ""; if (dateString.toLowerCase() === "now") { this.date = now; @@ -96,7 +97,6 @@ export class SMDate { // Split the date string into an array of components based on the length of each date component const components = dateString.split(/[ /-]/); - let time = ""; for (const component of components) { if (isNaN(parseInt(component))) { return this;