dump( date( 'Y-m-d', strtotime('2018-10-1 +1 day') ) );
dump( date( 'Y-m-d', strtotime('2018-10-1 +1 week') ) );
dump( date( 'Y-m-d', strtotime('2018-10-1 +1 month') ) );
dump( date( 'Y-m-d', strtotime('2018-10-1 +1 year') ) );
dump( date( 'Y-m-d', strtotime('2018-10-1 -1 day') ) );
dump( date( 'Y-m-d', strtotime('2018-10-1 -1 week') ) );
dump( date( 'Y-m-d', strtotime('2018-10-1 -1 month') ) );
dump( date( 'Y-m-d', strtotime('2018-10-1 -1 year') ) );
同理,把2018-10-1换成变量,就可以做很多事了!