Detailed reference of prototypes, properties and methods available in the
Javascript environment of your Helma web applications.

Adds useful methods to the JavaScript Date type.
To use this optional module, its repository needs to be added to the application, for example by calling app.addRepository('modules/core/Date.js')
Methods
Date. format(String, Object, Object)
Format a Date to a string. For details on the format pattern, see http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html
parameters

| String | Format pattern
| Object | Java Locale Object (optional)
| Object | Java TimeZone Object (optional)

returns

| String formatted Date

see

http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html

Date. toUtc()
set the date/time to UTC by subtracting the timezone offset
Date. toLocalTime()
set the date/time to local time by adding the timezone offset
Date. diff(dateObj)
returns the difference between this and another date object in milliseconds
parameters

| dateObj |

Date. getTimespan(Object)
return the timespan to current date/time or a different Date object
parameters

| Object | parameter object containing optional properties: .now = String to use if difference is < 1 minute .day|days = String to use for single|multiple day(s) .hour|hours = String to use for single|multiple hour(s) .minute|minutes = String to use for single|multiple minute(s) .date = Date object to use for calculating the timespan

returns

| Object containing properties: .isFuture = (Boolean) .span = (String) timespan

see

Date.prototype.getAge
Date.prototype.getExpiry

Date. getAge(param)
return the past timespan between this Date object and the current Date or a different Date object
parameters

| param |

see

Date.prototype.getTimespan

Date. getExpiry(param)
return the future timespan between this Date object and the current Date or a different Date object
parameters

| param |

see

Date.prototype.getTimespan

Date. equals(Object, Int)
checks if a date object equals another date object
parameters

| Object | Date object to compare
| Int | indicating how far the comparison should go

returns

| Boolean

Tue, 25 Nov 2008 16:50:19 GMT.

### core framework

- global
- app (application)
- req (request)
- res (response)
- session
- path
- root
- HopObject
- User
- File
- FtpClient
- Image
- Mail
- Remote
- Xml
- DatabaseObject
- MimePart
- Skin
- Object

### optional modules

- Array extensions
- Date extensions
- Number extensions
- Object extensions
- String extensions
- HopObject extensions
- global macros
- macro filters
- JSON methods
- helma.Aspects
- helma.Chart
- helma.Color
- helma.Database
- helma.File
- helma.Ftp
- helma.Group
- helma.Html
- helma.Http
- helma.Image
- helma.Mail
- helma.Search
- helma.Skin
- helma.Ssh
- helma.Url
- helma.Zip
- jala.BitTorrent
- jala.Captcha
- jala.Date
- jala.db
- jala.DnsClient
- jala.Form
- jala.History
- jala HopObject extensions
- jala.HtmlDocument
- jala.I18n
- jala.ImageFilter
- jala.IndexManager
- jala.ListRenderer
- jala.Mp3
- jala.PodcastWriter
- jala.RemoteContent
- jala.Rss20Writer
- jala.Utilities
- jala.XmlRpcRequest
- jala.XmlWriter

### java libraries

- browse docjar