Search
 
SCRIPT & CODE EXAMPLE
 

PHP

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));
Comment

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')));
Comment

php get last day of month

$lastOfMonth = date('Y-m-t');
Comment

PREVIOUS NEXT
Code Example
Php :: get current route laravel 
Php :: laravel abort_if 
Php :: Cannot use object of type stdClass as array 
Php :: php datetime to mysql 
Php :: how to delete image from floder in laravel 
Php :: php merge 2 arrays 
Php :: phpspreadsheet password protected 
Php :: psicopata narcisista 
Php :: send sms by php diafaan 
Php :: wordpress get site url 
Php :: check php version mac 
Php :: laravel nova create user 
Php :: laravel route is current route 
Php :: redaxo mform 7 
Php :: php divide string into parts 
Php :: wp get post thumbnail 
Php :: laravel gigapay create payout 
Php :: get today date in php 
Php :: laravel get class name 
Php :: override belongto parent appmodel cakephp 
Php :: php array order by date 
Php :: ci count 
Php :: php base64 encoded image to png 
Php :: code php ajout heure 
Php :: create session in php 
Php :: mysql server has gone away php 
Php :: wordpress throw to debug.log 
Php :: swich in php 
Php :: get original name without mutant model laravel 
Php :: get only date in laravel 
ADD CONTENT
Topic
Content
Source link
Name
3+2 =