Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

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')));
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #php #date #month
ADD COMMENT
Topic
Name
6+9 =