Function: time version 127

Function:
Description: Return current UNIX timestamp.
Version:
Status: latest
Date: 2011-12-20 05:49
Summary: Import from phpjs.
Programmer: jj5
Code
1
2
3
4
5
6
7
8
9
10
function time () {
    // http://jsphp.co/jsphp/fn/view/time
    // +   original by: GeekFG (http://geekfg.blogspot.com)
    // +   improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // +   improved by: metjay
    // +   improved by: HKM
    // *     example 1: timeStamp = time();
    // *     results 1: timeStamp > 1000000000 && timeStamp < 2000000000
    return Math.floor(new Date().getTime() / 1000);
}
[top]

Comments

There are no comments yet, be the first!

Please Login or Register to post comments.