Use the strtotime
method provided by PHP.
date('Y-m-d', strtotime('-7 days'))
Thanks to @lonesomeday for pointing out my mistake in the comments 😉
Use the strtotime
method provided by PHP.
date('Y-m-d', strtotime('-7 days'))
Thanks to @lonesomeday for pointing out my mistake in the comments 😉