Class o2.Date


static class o2.Date

A date/time utilities class.

Defined in date.core

Function Summary
static getPrettyDate (Integer time, Integer currTime)

Prints a human-readable time string, by looking at the difference between two timestamps.

Usage example:

 var timeString = o2.Date.getPrettyDate((new Date()).getTime());
 // timeString is 'just now'
 
static getTime()

An alias to o2.now.

Usage example:

 var linuxTime = o2.Date.getTime();
 
static now()

An alias to o2.Date.getTime.

Function Details

function getPrettyDate

static getPrettyDate(Integer time, Integer currTime)

Prints a human-readable time string, by looking at the difference between two timestamps.

Usage example:

 var timeString = o2.Date.getPrettyDate((new Date()).getTime());
 // timeString is 'just now'
 
Parameters:
time - the offset time in milliseconds.
currTime - (Optional, default to NOW) the base time in milliseconds.

function getTime

static getTime()

An alias to o2.now.

Usage example:

 var linuxTime = o2.Date.getTime();
 
See also:

function now

static now()

An alias to o2.Date.getTime.

See also: