Created
February 27, 2010 05:03
-
-
Save renzocastro/316484 to your computer and use it in GitHub Desktop.
ActionScript: getLastDateOfMonth Function
This file contains hidden or 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
private function getLastDateOfMonth(year:Number, month:Number):Number | |
{ | |
const maxDateOfMes:Number = 31; | |
var myDate:Date = new Date(year, month, maxDateOfMes); | |
return (myDate.getDate() == maxDateOfMes ? maxDateOfMes : maxDateOfMes - myDate.getDate()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment