Added stub for DATEDIFF function.

This commit is contained in:
Brad Arant 2025-12-03 14:55:26 -08:00
parent db59e9e87c
commit 50a29a4238

View File

@ -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";