PHP - Last day of the month/Number of days in the month
Using $m as the number of the month i and $y as year. Function date() can display directly the number of days in the month using the "t" character:
<? $month = mktime( 0, 0, 0, $m, 1, $y ); setlocal ('LC_ALL', 'en_EN'); echo "The month ".date("F Y",$mois)." Has ".date("t",$mois)." days"; ?>
You can have this value back using :
<? $numberofdays = intval(date("t",$mois)); ?>
Related
- PHP - Last day of the month/Number of days in the month
- Excel - Color cells for specific days in a month - How-To - Excel
- How to switch day and month in excel - Guide
- Convert column date from day month year to year month day ✓ - Forum - Android
- Https //m.facebook.com/home.php soft=bookmarks log out ✓ - Forum - Facebook
- You have 15 days left to enable facebook protect - Forum - Facebook
This document, titled « PHP - Last day of the month/Number of days in the month », is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (ccm.net).