Methods

age - w2utils.age(dateStr)
Returns age in human readable format.
base64decode - w2utils.base64decode(str)
Decodes string using base64 method.
base64encode - w2utils.base64encode(str)
Encodes string using base64 method.
date - w2utils.date(dateStr)
Returns date in human readable format.
encodeTags - w2utils.encodeTags(str)
Encodes HTML tags.
escapeId - w2utils.escapeId(id)
Escapes id for the use in jQuery.
formatDate - w2utils.formatDate(dateStr, format)
Returns date in requested format.
formatDateTime - w2utils.formatDateTime(dateStr, format)
Returns date and time in requested format.
formatNumber - w2utils.formatNumber(val)
Formats a number adding commas.
formatTime - w2utils.formatTime(dateStr, format)
Returns time in requested format.
getSize - w2utils.getSize(el, type)
Returns the size or absolute position of the element in px including padding, margin and border.
isAlphaNumeric - w2utils.isAlphaNumeric(str)
Returns true if str is alpha-numeric.
isDate - w2utils.isDate(str, [format])
Returns true if str is a date.
isEmail - w2utils.isEmail(str)
Returns true if str is a valid email address.
isFloat - w2utils.isFloat(str)
Returns true if str is a float number.
isHex - w2utils.isHex(str)
Returns true if str is a hex number.
isInt - w2utils.isInt(str)
Returns true if str is a integer number.
isMoney - w2utils.isMoney(str)
Returns true if str is in money format.
isTime - w2utils.isTime(str)
Returns true if str is a valid time.
lang - w2utils.lang(phrase);
Returns translation for the phrase.
locale - w2utils.locale(locale);
Loads new locale
lock - w2utils.lock(box, message, showSpinner)
Locks HTML element.
scrollBarSize - w2utils.scrollBarSize()
Returns width of a scrollbar
size - w2utils.size(int)
Returns human readable file size.
stripTags - w2utils.stripTags(str)
Removes all HTML tags.
transition - w2utils.transition(div_old, div_new, type, [callBack])
Transitions two absolute divs.
unlock - w2utils.unlock(box)
Unlocks HTML element.