Index

Classes

Class

Methods

Class Banana.Util.DateTimecode


Defined in: DateTimecode.js.

Class Detail
Banana.Util.DateTimecode(data, local)

Date timecode helper class. Behaves like the regular Date class with timecode support.

Example: var date = new Banana.Util.DateTimecode("25-04-2011 20:23:12:13"); var tc = date.getTimecode(); var time = date.getTime();

Parameters:
{String} data
{boolean} local
when true we are in local time
Method Detail
{this} add(other)

Adds date time

Parameters:
{Banana.Util.DateTimecode} other
Returns:
{this}
addMonth(local, monthDay)
Parameters:
{int} local
{int} monthDay
of the month. When given this day is forced
Returns:
Banana.Util.DateTimecode
{int} compareTo(other)

Compares date time.

Parameters:
{Banana.Util.DateTimecode} other
Returns:
{int} diff between given datetime and this datetime
{String} getDate(format)

gets date by default '%d-%m-%Y'

Parameters:
{String} format
Returns:
{String}
{String} getDateTime(format)

gets date time by given format. By default '%d-%m-%Y %H:%M:%S:%F'

Parameters:
{String} format
Returns:
{String}
{int} getDay()

gets day number

Returns:
{int}
{String} getLocalDate(format)

gets local date by default '%d-%m-%Y'

Parameters:
{String} format
Returns:
{String}
{String} getLocalDateTime(format)

gets local date time by given format. By default '%d-%m-%Y %H:%M:%S:%F'

Parameters:
{String} format
Returns:
{String}
{int} getLocalMonth()

gets local month number

Returns:
{int}
{int} getLocalMonthDay()

gets local month day number

Returns:
{int}
{String} getLocalTime(format)

gets local time by default '%H:%M:%S:%F'

Parameters:
{String} format
Returns:
{String}
{int} getMonth()

gets month number

Returns:
{int}
{int} getMonthDay()

gets local month number

Returns:
{int}
{String} getTime(format)

gets time by default '%H:%M:%S:%F'

Parameters:
{String} format
Returns:
{String}
{int} getTimecode()
Returns:
{int} timecode
{int} getUTCYear()

get utc year

Returns:
{int}
{int} getWeek()

gets week number

Returns:
{int}
{int} getYear()

get year

Returns:
{int}
{this} setLocalDate(string)
Parameters:
{String} string
Returns:
{this}
{this} setLocalDateTime(string)
Parameters:
{String} string
Returns:
{this}
{this} setLocalTime(string)

sets local time

Parameters:
{String} string
Returns:
{this}
{this} setTime(string)

sets time

Parameters:
{String} string
Returns:
{this}
setTimecode(timecode)
Parameters:
{int} timecode
{this} setUTCYear(y)

sets utc year

Parameters:
{int} y
Returns:
{this}
{this} setYear(y)

sets year

Parameters:
{int} y
Returns:
{this}
{this} sub(other)

Subtracts date time

Parameters:
{Banana.Util.DateTimecode} other
Returns:
{this}

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Dec 05 2012 22:02:08 GMT+0100 (CET)