There you go...

 

public function getLastDayOfMonth(month:Number, year:Number):Number

{

                  var lastDay:Number;

                  

                   if (month == FEBRUARYNUMBER) 

 {

                         if (((year % 4) == 0 && (year % 100)!=0) ||
(year % 400)==0) {

                              lastDay = 29;

                         } else {

                              lastDay = 28;

                         }

                   } else if((month < 7 && month % 2 == 0)||(month >= 7
&& month % 2 == 1)) {

                        lastDay = 31;

                   } else{

                        lastDay = 30;

                  }

                  return lastDay; 

            }

 

________________________________

De: [email protected] [mailto:[EMAIL PROTECTED] Em
nome de Indra Prastha
Enviada em: quarta-feira, 11 de junho de 2008 05:33
Para: [email protected]
Assunto: [flexcoders] Finding the last day of the month

 

Hi,

I used to work with Coldfusion where they have this function like
DaysInMonth(date), to obtain the last day of the month (31 / 30, or 28 /
29 for feb / leap year)
,and it's very handy, is there anyway I could achieve the same function
in Flex?

Thanks.

Cheers!

Indra Prastha,
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 
ERP Team @ DataOn Corp.

________________________________

 

 

Reply via email to