View Single Post
Old 06-16-2022, 08:21 PM  
Publisher Bucks
Confirmed User
 
Industry Role:
Join Date: Oct 2018
Location: New Orleans, Louisiana. / Newcastle, England.
Posts: 1,125
Date() countdown until last Sunday of the month?

I have the following code:

Quote:
$dt_end = new DateTime('June 26, 2022');
$remain = $dt_end->diff(new DateTime());
echo $remain->d . ' days and ' . $remain->h . ' hours';
How would I go about changing it so that each month, it will display the days until the last Sunday of the month without having to put the date in the code?

I've searched a few different places and can't find anything specific to what I need

Hopefully that makes sense?

TIA for any help you can offer.
__________________
SOMETHING EXTREME IS COMING SOON!
Publisher Bucks is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote