View Namespace


Classes


DateHelper

constructor

With the help of this method you can create a new instance of DateHelper.

Signature

constructor(void) : Object|DateHelper

Returns

  • Object, DateHelper
    • A new instance of DateHelper

setLang

Set the language of all date outputs.

Signature

setLang(String lang) : void

Parameters

  • lang
    • Language to set
    • Type: String

format

Format a date with the help of moment.

Signature

format([Date date], String format) : String

Parameters

  • [date]
    • The date to format, if ommited it's now
    • Type: Date
  • format
    • Format string which will be processed by moment
    • Type: String

Returns

  • String
    • The return value is not further described

diffToNow

Calculate the difference from date to now in minutes or another unit.

Signature

diffToNow(Date date, [String unit]) : Integer

Parameters

  • date
    • The first date
    • Type: Date
  • [unit]
    • Unit of the difference, default: minutes
    • Type: String

Returns

  • Integer
    • The return value is not further described

equals

Check if the two given dates are equals.

Signature

equals(Date dateA, Date dateB) : Boolean

Parameters

  • dateA
    • The first date
    • Type: Date
  • dateB
    • The second date
    • Type: Date

Returns

  • Boolean
    • The return value is not further described

different

Check if the two given dates are different.

Signature

different(Date dateA, Date dateB) : Boolean

Parameters

  • dateA
    • The first date
    • Type: Date
  • dateB
    • The second date
    • Type: Date

Returns

  • Boolean
    • The return value is not further described


RouteHelper

constructor

With the help of this method you can create a new instance of RouteHelper.

Signature

constructor(void) : Object|RouteHelper

Returns

  • Object, RouteHelper
    • A new instance of RouteHelper

current

Match the current route.

Signature

current(String currentPath, String path, String classes) : String

Parameters

  • currentPath
    • Current path to compare
    • Type: String
  • path
    • Path to match with current route
    • Type: String
  • classes
    • Classes string to return on match
    • Type: String

Returns

  • String
    • The return value is not further described