This content has been marked as final. Show 4 replies
I just tested it and it works fine! Here is my test function:
private function getNumberOfDaysInAMonth(iOneBasedMonthNumber:int):Number
//in the next line of code,
//since months are really zero-based, this is asking for March, 0
//but out of range days go forward or back, so March "0" returns the last day in February
var d:Date = new Date(2004, iOneBasedMonthNumber, 0);
var iDay:int = d.getDate(); //this returns the day number of that last day
Thanks again! Yeah I googled this topic for like 30 mins today and did not get the answer, I always try to find it on my own first, but don't want to waste too much time ;) I guess I was just not typing in the correct search string. Anyway, thank so much for this, it will help a ton!
That's cool. One reason I like to help others here is that I learn things I will certainly need myself someday. This is a prime example.