Global.Date.prototype.format (format, locale, timezone)
format a Date to a string

  • Parameter String:
    Format pattern
  • Parameter Object:
    Java Locale Object (optional)
  • Parameter Object:
    Java TimeZone Object (optional)
  • Returns
    String formatted Date
Sourcecode in /home/hannes/helma/modules/core/Date.js:
35:   Date.prototype.format = function (format, locale, timezone) {
36:       if (!format)
37:           return this.toString();
38:       var sdf = locale ? new java.text.SimpleDateFormat(format, locale)
39:                        : new java.text.SimpleDateFormat(format);
40:       if (timezone && timezone != sdf.getTimeZone())
41:           sdf.setTimeZone(timezone);
42:       return sdf.format(this);
43:   }