includes/clientside/static/misc.js
changeset 334 c72b545f1304
parent 326 ab66d6d1f1f4
child 335 67bd3121a12e
--- a/includes/clientside/static/misc.js	Fri Dec 21 19:08:27 2007 -0500
+++ b/includes/clientside/static/misc.js	Wed Dec 26 00:37:26 2007 -0500
@@ -792,3 +792,13 @@
   return ( email.match(/^(?:[\w\d_-]+\.?)+@((?:(?:[\w\d_-]\-?)+\.)+\w{2,4}|localhost)$/) ) ? true : false;
 }
 
+/**
+ * Equivalent of PHP's time()
+ * @return int
+ */
+
+function unix_time()
+{
+  return parseInt((new Date()).getTime()/1000);
+}
+