Answers for "php get last month start and end date"

PHP
0

php get start and end date of month and year

<?php

$query_date = '2010-02-04';

// First day of the month.
echo date('Y-m-01', strtotime($query_date));

// Last day of the month.
echo date('Y-m-t', strtotime($query_date));
Posted by: Guest on July-01-2020
4

get last month php

$currentMonth = date('M');// if number, then date('m');
//Last month
$lastMonth = Date("F", strtotime("first day of previous month");
$nextMonth = Date("F", strtotime("first day of next month");
Posted by: Guest on July-30-2020
1

get month first date and last date in php

$first_day_this_month = date('m-01-Y'); // hard-coded '01' for first day
$last_day_this_month  = date('m-t-Y');
Posted by: Guest on September-06-2021
1

php last day of month

$a_date = "2009-11-23";
echo date("Y-m-t", strtotime($a_date));
Posted by: Guest on July-28-2020

Code answers related to "php get last month start and end date"

Browse Popular Code Answers by Language