Name

Date.toString( ) Method — a human-readable string representing the date

Availability

Flash 5

Synopsis

date.toString( )

Returns

A string giving the current time and date of date in human-readable format, including the UTC (GMT) offset. To compose customized representations of the date, use the methods for retrieving the day, hours, minutes, and so on, and map those values onto your own strings, as shown earlier in the example under Date class.

Example

trace (myDate.toString( )); // Displays a date in the format:
                           // Wed Sep 15 12:11:33 GMT-0400 1999

Get ActionScript: The Definitive Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.