Extensions

Les objets de base JavaScript ont été étendus avec de nouvelles méthodes.

Array

Fonction Description
Long toList() Retourne un ArrayList Java (voir ConvertUtils).

Date

Fonction Description
Date toDate() Alias de toJavaDate().
DateTime toDateTime() Alias de toJavaDateTime().
Date toJavaDate() Retourne une Date Java (voir ConvertUtils).
DateTime toJavaDateTime() Retourne un DateTime Java (voir ConvertUtils).
String toStandardString() Retourne une String représentant la date, formatée au format SAINet (yyyy-MM-dd HH:mm:ss).
String toFormattedString(String dateSeparator, String timeSeparator) Retourne une date formattée avec dd/MM/yyyy HH:mm:ss en utilisant les séparateurs spécifiés (/ et : si null).
String toFormattedShortString(String dateSeparator) Retourne une date formattée avec dd/MM/yyyy en utilisant le séparateur (/ si null).

Number

Fonction Description
Integer toInt() Retourne un Integer Java (voir ConvertUtils).
BigDecimal toBigDecimal() Retourne un BigDecimal Java (voir ConvertUtils).
Date toDate() Retourne une Date Java (voir ConvertUtils).

String

Fonction Description
Number toInt() Retourne la chaîne parsée en integer.
Number toFloat() Retourne la chaîne parsée en float.
Number toBigDecimal() Retourne la chaîne parsée en BigDecimal.
String trim() Retourne la chaîne trimmée.