How to Calculate the Last Day of the Month in PHP
erics, April 24th, 2012
$lastDay = date(“Y-m-t”, strtotime(“-3 months”)); $firstDay = date(“Y-m-01”, strtotime(“-3 months”));
$lastDay = date(“Y-m-t”, strtotime(“-3 months”)); $firstDay = date(“Y-m-01”, strtotime(“-3 months”));
Categories: How-To's, Technology Tags: Date, First Day, howto, Last Day, Last Day of the Month, Month, php, strtotime, tips | No comments
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Copyright © 2005-2025 Eric Michael Stone | Random Thoughts, Whims and Fancies…. Powered by WordPress