includes/clientside/static/misc.js
changeset 334 c72b545f1304
parent 326 ab66d6d1f1f4
child 335 67bd3121a12e
equal deleted inserted replaced
333:32429702305e 334:c72b545f1304
   790 function validateEmail(email)
   790 function validateEmail(email)
   791 {
   791 {
   792   return ( email.match(/^(?:[\w\d_-]+\.?)+@((?:(?:[\w\d_-]\-?)+\.)+\w{2,4}|localhost)$/) ) ? true : false;
   792   return ( email.match(/^(?:[\w\d_-]+\.?)+@((?:(?:[\w\d_-]\-?)+\.)+\w{2,4}|localhost)$/) ) ? true : false;
   793 }
   793 }
   794 
   794 
       
   795 /**
       
   796  * Equivalent of PHP's time()
       
   797  * @return int
       
   798  */
       
   799 
       
   800 function unix_time()
       
   801 {
       
   802   return parseInt((new Date()).getTime()/1000);
       
   803 }
       
   804