You appear to be a bot. Output may be restricted
Description
Format a date with the specified format
Usage
bw_format_date( $date, $format );
Parameters
- $date
- ( string ) optional – either a number – representing the UNIX date or a recognisable date string or NULL – for the current date e.g. 1293840000 => 2011-01-01
- -12-31 => 2011-12-31
- $format
- ( string ) optional default: Y-m-d – date formatting string
Returns
voidSource
File name: oik-bwtrace/libs/bobbfunc.phpLines:
1 to 13 of 13
function bw_format_date( $date=NULL, $format="Y-m-d" ) { if ( $date != NULL ) { $date = trim( $date ); if ( !is_numeric( $date ) ) { $date = strtotime( $date ); } $date = date( $format, $date ); // bw_trace2( $date, "date" ); } else { $date = date( $format ); } return( $date ); }View on GitHub View on Trac