RWMB_Datetime_Field::value PHP Method

value() public static method

Calculates the timestamp from the datetime string and returns it if $field['timestamp'] is set or the datetime string if not
public static value ( mixed $new, mixed $old, integer $post_id, array $field ) : string | integer
$new mixed
$old mixed
$post_id integer
$field array
return string | integer
    public static function value($new, $old, $post_id, $field)
    {
        return $field['timestamp'] ? $new['timestamp'] : $new;
    }