Date and Time Functions
You might want to know the date and time to create a Projector that expires after a certain date (see Example 11-7) or to provide a different introduction depending on the day of the week. The date
and time
are always returned as strings, but their format will vary with the user’s configuration and language. Use the value()
function to convert a portion of the string to an integer.
Date Properties
Both Macintosh and Windows support separate short date and long date formats, which are used by Director’s the short date
and the long date
properties. Table 11-5 shows the basic date formats. Under Windows 3.1, the date format is set in the International control panel and stored in the SYSTEM.INI file. Under Windows 95, it is configured using the Date tab of the Regional Settings control panel (not the Date/Time control panel). On the Macintosh, it is configured using the Date Formats option in the Date & Time control panel.
Table 11-5. Date Formats
Date Command |
Format Depends on |
Typical U.S. Example |
---|---|---|
the date the short date |
OS’s short date setting, such as MM/DD/YY |
12/05/97 |
the abbr date the abbrev date the abbreviated date |
OS’s long date setting with abbreviated month name and weekday |
Fri, Dec 05, 1997 |
the long date |
OS’s long date setting |
Friday, December 05, 1997 |
Date Formats and Y2K
The user may have changed the style of the date formats including the order of the fields within each format. Moreover, the default format varies for different countries and ...
Get Lingo in a Nutshell 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.