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