From 628406f0a50e040d4661629446c620a3a495441f Mon Sep 17 00:00:00 2001 From: Rubén Beltrán del Río Date: Thu, 24 Sep 2026 21:01:06 +0200 Subject: Initial commit --- sourcehut-builds/date_utils.luau | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 sourcehut-builds/date_utils.luau (limited to 'sourcehut-builds/date_utils.luau') diff --git a/sourcehut-builds/date_utils.luau b/sourcehut-builds/date_utils.luau new file mode 100644 index 0000000..be47b3a --- /dev/null +++ b/sourcehut-builds/date_utils.luau @@ -0,0 +1,16 @@ +return { + parseDate = function(dateString: string): number + local pattern = "(%d+)-(%d+)-(%d+)T(%d+):(%d+):(%d+).(%d+)" + local runyear, runmonth, runday, + runhour, runminute, runseconds = dateString:match(pattern) + + return os.time({ + year = runyear, + month = runmonth, + day = runday, + hour = runhour, + min = runminute, + sec = runseconds + }) + end +} -- cgit