LLMS_Generator::format_date( string $raw_date = null )
Ensure raw dates are correctly formatted to create a post date falls back to current date if no date is supplied
Description Description
Parameters Parameters
- $raw_date
-
(string) (Optional) Raw date from raw object.
Default value: null
Return Return
(string)
Source Source
File: includes/class.llms.generator.php
public function format_date( $raw_date = null ) { if ( ! $raw_date ) { return current_time( 'mysql' ); } else { return date( 'Y-m-d H:i:s' , strtotime( $raw_date ) ); } }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.30.2 | Made publicly accessible. |
3.3.0 | Introduced. |