Date, Time and Number Formats
Date, Time and Number Formats
The following sections discuss the enormous differences in the forms of dates,
times, and numbers. These differences should all be considered and accounted
for when using worldwide system software, particularly the Macintosh Script
Management System.
Date and Time
Formatting dates and times for a particular script and region requires the
specification of the elements in the date or time, the number of digits used for
each numeric element (for example, 3/01/90 or 3/1/90), the names of the
months and the days of the week, and other characteristics such as the order of
the elements and the use of ÚA.M.Ù and ÚP.M.Ù instead of a 24-hour clock.
Each 'itl0' resource contains short date and time formats. Each 'itl1' resource
contains long date formats. With system software version 7.0, the 'itl1'
resource can be optionally extended to contain a list of extra day names for
calendars with more than 7 days, a list of extra month names for calendars
with more than 12 months, a list of abbreviated day names, a list of
abbreviated month names, and a list of additional date separators. See
The 'itl0' Resource and The 'itl1' Resource for details.
Currency and Measurement
Currency formats include the specification of the currency indicator (for
example, $, L, or DM) and whether it precedes or follows the value. Units of
measurement can be specified as metric or imperial (inches and miles). Each
'itl0' resource contains formats for currency and indicates the preferred
measurement unit. See The 'itl0' Resource for details.
Calendars
Although it is very accurate and on the whole conforms to natural phenomena,
the standard Gregorian calendar used in Europe and the Americas is not
universally accepted. For example, different calendar systems are often used in
Japan and the Arabic world.
For instance, the Arabic calendar is lunar rather than solar. The months
are alternately 29 and 30 days long, so the Arabic calendar year is about 11
days shorter than the Gregorian year. The months have no fixed relation to the
sun, so they slowly rotate through all of the seasons of the year (that is, every
three years the months shift forward one month). The Arabic calendar is used
extensively throughout the Middle East. Examples of other calendars include
Chinese, Coptic, Japanese, and Jewish.
The Macintosh represents dates in memory as the absolute number of seconds
since January 1, 1904. For more on this topic, see the discussion "Working
With Date Formats and Calendar Conversion" in Macintosh Worldwide
Development: Guide to System Software.
With system software version 7.0, the 'itl1' resource has been extended to
contain an optional calendar code. Multiple calendars may be available on some
systems, and it is necessary to identify the particular calendar for use with
the 'itl1' resource. Constants for the various calendars are listed in
Script Manager Data.
Numbers
Scripts differ in many aspects of the representation of numbers, so you need
to make allowances for different formats of numbers. The Japanese script, for
instance, uses the standard ASCII Western digits, double-byte encodings of the
same Western digits, and native Japanese number characters, which occur in
both a standard and a nonforgeable form-that is, a form that cannot be
converted into another digit by the addition of strokes (used for financial
instruments and so forth). Each 'itl0' resource contains formats for numbers.