Ignore:
Timestamp:
May 24, 2015 3:01:42 PM (9 years ago)
Author:
anonymous
Message:

First set of changes towards 2.2.0. Improved functinoality with integration in wordpress; bugs fixed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Validator.inc.php

    r502 r523  
    267267            return true;
    268268        }
     269    }
     270
     271    /*
     272    * Checks if value is a "zero" SQL DATE, DATETIME, or TIMESTAMP value (or simply empty).
     273    *
     274    * @access   public
     275    * @param    string  $val    String to check.
     276    * @return   bool            True if value is an empty date.
     277    * @author   Quinn Comendant <quinn@strangecode.com>
     278    * @version  1.0
     279    * @since    19 May 2015 09:57:27
     280    */
     281    static public function isEmptyDate($val)
     282    {
     283        if (empty($val) || '0000-00-00 00:00:00' == $val || '0000-00-00' == $val || '00:00:00' == $val) {
     284            return true;
     285        }
     286        return false;
    269287    }
    270288
Note: See TracChangeset for help on using the changeset viewer.