From 387866c73e563bcccb50f2ad4bd7bb7115203e72 Mon Sep 17 00:00:00 2001 From: Aston Monteiro <152646326+Aston8@users.noreply.github.com> Date: Sun, 19 Apr 2026 19:30:21 +0530 Subject: [PATCH] Fix MIN() to handle date comparison correctly --- src/55functions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/55functions.js b/src/55functions.js index 9bdc42ff24..96810c90ac 100644 --- a/src/55functions.js +++ b/src/55functions.js @@ -178,7 +178,7 @@ stdlib.MIN = stdlib.LEAST = function () { return ( '[' + Array.prototype.join.call(arguments, ',') + - '].reduce(function (a, b) { return a < b ? a : b; })' + '].reduce(function (a, b) { ' + 'if(a==null) return b; ' + 'if(b==null) return a; ' + ' return new Date(a).getTime() < new Date(b).getTime() ? a : b; })' ); };