|
|
|
|
|
|
|
This section fully describes the two header files specifically used in ISO applications. |
|
|
|
|
|
|
|
|
8.3.1
The Header File iso_1.h |
|
|
|
|
|
|
|
|
The header file iso_1.h (Listing 8.1) contains definitions and data structures. |
|
|
|
|
| Listing 8.1 iso_1.h | |
|
|
|
|
/* iso_1.h
+-------------------------------------------+
| Copyright (C) 1995 by Lance W. Latham. |
| All rights reserved. |
+-------------------------------------------+
Header file in the SCDTL series for ISO-related matters.
Header files in the ISO series in SCDTL are:
1. "iso_1.h", definitions and data structures.
2. "iso_2.h", basic function prototypes.
*/
#ifndef __ISO_1_H
#define __ISO_1_H
#include "dateinfo.h"
#include "timeinfo.h"
/* Data structure definitions */
/*
The ISO_YWD structure contains the data items needed to store a date in the
year-week-day format suggested by document ISO-8601/1988. The year is the
year in the Western calendar. The 'week' is the week number, from 1 to 53,
defined according to ISO rules. The 'day' is the day in the week, from 1 to 7,
with Monday = 1, Tuesday = 2 , . . . Sunday = 7, according to ISO definition.
*/
struct ISO_YWD
{
int year;
int week;
int day;
};
/*
The ISO_DATE_TIME structure allows the 'full' date and time used in ISO document
8601 to be carried. The exception to ISO usage is the fact that fractions of
seconds cannot be expressed, since time is carried to unit seconds only in this
structure. This structure also requires that fractions of minutes be expressed as
integer seconds, and fractions of hours be expressed as integer minutes and
integer seconds.
*/
|
|
|
|
|
|
|
|