IUDateString
long rawSecs ; seconds since 1/1/1904 (ala GetDateTime) DateForm format ; 0=short form, 1=long form, 2=abbreviated
Str255 resultStr ; address of buffer to receive resulting p- string IUDateString converts a date/time value into a string of text identifying the corresponding date. International styles are taken into consideration for the
output.
rawSecs is a long integer; the number of seconds since Midnight, 1/1/1904.
You can use any time value obtained from a file or catalog information
format specifies desired option in the output. It is one of the following
constants defined in Packages.h:
shortDate (0) Digits and separators: 10/1/1989
longDate (1) Long text: Wednesday, February 1, 1989
abbrevDate (2) Abbreviated text: Wed, Feb 1, 1989
resultStr is the address of a buffer. Upon return, it will contain the text of
the date as a pascal-style length-prefixed string in the format
specified by format and in the language and layout identified by
'INTL' resource 1.
information for display. These functions rely on information from 'INTL'
resources 0 and 1 in determining how to layout the text of the output string.
A " programmer's" variation, IUDatePString lets you alter the data structures to modify the output. For instance, you can force leading zeros to
be output or shorten or lengthen the abbreviation of months and days.
A related utility is Secs2Date, which converts a raw time value into fields of day, date, hours, minutes, etc.
Example
#include <Packages.h>
long todayNum;
IUDateString( todayNum, longDate, todayStr ); /* text w/o abbreviations */