From 50a29a4238f2538f51013cf42ab26b27f0b1afbe Mon Sep 17 00:00:00 2001 From: Brad Arant Date: Wed, 3 Dec 2025 14:55:26 -0800 Subject: [PATCH] Added stub for DATEDIFF function. --- Operand.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Operand.cpp b/Operand.cpp index 6fc7ca9..69559fc 100644 --- a/Operand.cpp +++ b/Operand.cpp @@ -364,7 +364,21 @@ namespace jet { int unixtime = seconds_since_epoch.count(); string << unixtime; } else - throw coreutils::Exception("Expecting ) at end of UNIXTIME."); + throw coreutils::Exception("Expecting ) at end of UNIXTIME."); + } + else if(in.ifNextIgnoreCase("DATEDIFF")) { + if(!in.ifNext("(")) + throw coreutils::Exception("Expecting ( for DATEDIFF."); + Operand parm1(in, tag); + if(!in.ifNext(",")) + throw coreutils::Exception("Expecting , in DATEDIFF expression."); + Operand parm2(in, tag); + if(in.ifNext(")")) { + + // TODO: Implement DATEDIFF. + + } else + throw coreutils::Exception("Expecting ) at end of DATEDIFF expression."); } else if(in.ifNextIgnoreCase("true")) { boolean = true; string = "true";