From e729f920139f0c65902be2d6b2c32466b08375e8 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Mon, 20 Oct 2025 17:54:52 +0000
Subject: [PATCH] =Form updates
---
assets/js/dash/UtilityFunctions.js | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/assets/js/dash/UtilityFunctions.js b/assets/js/dash/UtilityFunctions.js
index ec64aac..b682acc 100644
--- a/assets/js/dash/UtilityFunctions.js
+++ b/assets/js/dash/UtilityFunctions.js
@@ -420,7 +420,22 @@
window.showToast = function(message, type='success', actions={}){
window.jvbNotifications.showToast(message, type, actions);
}
+window.dateFormatter = new Intl.DateTimeFormat('en-CA', {
+ year: 'numeric',
+ month: 'long',
+ day: 'numeric',
+ hour: '2-digit',
+ minute: '2-digit',
+ second: '2-digit',
+ timeZoneName: 'short'
+ });
+window.formatDate = function(date) {
+ if (!(date instanceof Date && !isNaN(date))) {
+ date = new Date(date);
+ }
+ return window.dateFormatter.format(date);
+}
/**
* Outputs the set text as if a typewriter were writing it
--
Gitblit v1.10.0