You appear to be a bot. Output may be restricted
Description
Adjust a date using PHP's date_add() functionThis function can be used to apply date adjustments such as <pre> +1 year +1 year 6 months +2 years </pre>
Usage
$string = bw_date_adjust( $adjustment, $date, $format );
Parameters
- $adjustment
- ( string ) optional default: 1 year – the date adjustment to apply
- $date
- ( string ) optional – date to adjust
- $format
- ( string ) optional default: Y-m-d – the required format for the new date
Returns
string the new dateSource
File name: oik-batchmove/oik-batchmove.phpLines:
1 to 5 of 5
function bw_date_adjust( $adjustment="1 year", $date=null, $format='Y-m-d' ) { $adate = date_create( $date ); date_add( $adate, date_interval_create_from_date_string( $adjustment )); return( date_format( $adate, $format ) ); }View on GitHub View on Trac