From: Janusz Dobrowolski Date: Fri, 9 Jan 2015 19:01:59 +0000 (+0100) Subject: Added two new helpers date_comp, sql_date_comp. X-Git-Tag: v2.4.2~19^2~274 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=b0c4c9777f9574e9c2805fddc2a12576d75d94ce;p=fa-stable.git Added two new helpers date_comp, sql_date_comp. --- diff --git a/includes/date_functions.inc b/includes/date_functions.inc index 4d0fd5f8..623452e2 100644 --- a/includes/date_functions.inc +++ b/includes/date_functions.inc @@ -421,6 +421,38 @@ and converts to a yyyy/mm/dd format */ return sprintf("%04d-%02d-%02d", $year, $month, $day); }// end of function +/** + * Compare dates in sql format. + * Return +1 if sql date1>date2, -1 if date1