Ignore:
Timestamp:
11/11/09 17:13:52 (14 years ago)
Author:
rafaelraymundo
Message:

Ticket #722 - Implementação da pesquisa avançada no expressoMail.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoMail1_2/js/common_functions.js

    r1610 r1622  
    862862        } 
    863863} 
     864 
     865function validate_date(date){ 
     866    if (date.match(/^[0-3][0-9]\/[0-1][0-9]\/\d{4,4}$/)) 
     867    { 
     868        tmp = date.split('/'); 
     869 
     870        day = new Number(tmp[0]); 
     871        month = new Number(tmp[1]); 
     872        year = new Number(tmp[2]); 
     873        if (month >= 1 && month <= 12 && day >= 1 && day <= 31) 
     874        { 
     875            if (month == 02 && day <= 29) 
     876            { 
     877                return true; 
     878            } 
     879            return true; 
     880        } 
     881        else 
     882            { 
     883                return false; 
     884            } 
     885    } 
     886    else 
     887        { 
     888            return false; 
     889        } 
     890} 
Note: See TracChangeset for help on using the changeset viewer.