Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Operating System Utilities /


Chapter 4 - Date, Time, and Measurement Utilities

This chapter describes a set of utility routines that you can use to operate on dates and times. You can use these routines to get and change information about the current date, time, geographic location, time zone, and units of measurement.

The routines described in this chapter return this information in a format that is best suited to the current script. As a result, you can facilitate localization of your application by using these date, time, and measurement utilities.

To understand the material in this chapter, you need to be familiar with the international resources, especially the numeric-format and long-date-format resources, and the Script Manager. These topics are described in Inside Macintosh: Text. In addition, the chapter "Text Utilities" in Inside Macintosh: Text describes how to convert date and time information into strings of text.

Many of the Date, Time, and Measurement Utilities were previously associated with other managers in the Macintosh system software, and several of these routines have been renamed. Table 4-4 on page 4-33 shows the original names and locations of the modified Date, Time, and Measurement Utilities routines.

The next section provides an introduction to the Date, Time, and Measurement Utilities.


Chapter Contents
About the Date, Time, and Measurement Utilities
Date and Time
Geographic Location and Time Zone
System of Measurement
Time Measurement
Using the Date, Time, and Measurement Utilities
Getting the Current Date and Time
Setting the Current Date and Time
Converting Date-Time Formats
Calculating Dates
Working With Different Calendar Systems
Handling Geographic Location and Time-Zone Data
Determining the Measurement System
Determining the Number of Elapsed Microseconds
Date, Time, and Measurement Utilities Reference
Data Structures
The Date-Time Record
Long Date-Time Value and Long Date-Time Conversion Record
The Long Date-Time Record
The Geographic Location Record
The Toggle Parameter Block
The Unsigned Wide Record
Routines
Getting the Current Date and Time
Setting the Current Date and Time
Converting Between Date-Time Formats
Converting Between Long Date-Time Format
Modifying and Verifying Long Date-Time Records
Reading and Writing Location Data
Determining the Measurement System
Measuring Time
Summary of the Date, Time, and Measurement Utilities
Pascal Summary
Constants
Data Types
Routines
C Summary
Constants
Data Types
Routines
Assembly-Language Summary
Data Structures
Global Variables
Result Codes

Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996