Last active
December 23, 2015 02:39
-
-
Save frayhan32/6568060 to your computer and use it in GitHub Desktop.
How Many Day This Month
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//****************************************************************************// | |
//************************How many day this month*****************************// | |
//****************************************************************************// | |
//****************************************************************************// | |
//********************Result Also Depend On Your Time Setting System**********// | |
//****************************************************************************// | |
function dayThisMonth(year,month){ | |
return new Date(year,month,0).getDate(); | |
} | |
//****************************************************************************// | |
//************************************TEST HIM*******************************/// | |
//****************************************************************************// | |
//When test add getMonth with 1 cause in Js month assumed from 0 | |
alert(dayThisMonth(new Date().getFullYear(),new Date().getMonth()+1)); | |
//Distributor Faris Rayhan | |
//May Be used to create calendar Object further | |
//regards |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment