Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP strtotime + 1 month and return 23:59 [closed]

Tags:

php

I can have +1 month using strtotime but how do I return that day 23:59:59?

For example now is 2013-06-19 03:28 if I were add 1 month then it will return 2013-07-19 03:28 but I need 2013-07-19 23:59.

like image 491
Peter Avatar asked Dec 14 '25 23:12

Peter


1 Answers

date("Y-m-d 23:59:59", strtotime("+1 month"));
like image 142
Orangepill Avatar answered Dec 16 '25 11:12

Orangepill



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!