Answers for "how to get last day of specific month in php"

PHP
0

php get end date of month

// First date of the month.
$monthFirstDate = date('Y-m-01', strtotime('today'));

// Last date of the month.
$monthLastDate = date('Y-m-t', strtotime('today'));

// Second last date of the month
$monthLastSecondDate = date('Y-m-d', strtotime('-2 day', strtotime('today')));
Posted by: Guest on September-07-2021
1

last day of previous month in php

$lastDay = date('t',strtotime('last month'));

print_r($lastDay);
Posted by: Guest on November-28-2020
1

get last month using php

//Last month
$lastMonth = Date("F", strtotime("first day of previous month");
$nextMonth = Date("F", strtotime("first day of next month");
Posted by: Guest on November-28-2020

Code answers related to "how to get last day of specific month in php"

Browse Popular Code Answers by Language