LLMS_Date::db_date( [date] $date, [type] $type = '' )
Converts date to yyyymmdd Converts any type of date format Optional field type accepts ‘au’ to convert Australian dd/mm/yyyy date format Used for date db storage
Parameters Parameters
- $date
-
([date]) (Required) [datestring]
- $type
-
([type]) (Optional) [optional field for managing AU date conversions]
Default value: ''
Return Return
([date]) [datestring]
Source Source
File: includes/class.llms.date.php
public static function db_date( $date, $type = '' ) { if ( 'au' === $type ) { list($d, $m, $y) = preg_split( '/\//', $date ); $date = sprintf( '%4d-%02d-%02d', $y, $m, $d ); } else { $date = date( 'Y-m-d', strtotime( $date ) ); } return $date; }
Expand full source code Collapse full source code View on GitHub