Application module: Extended date ISO/TS 10303-1776:2014-02(E)
© ISO

Cover page
Table of contents
Copyright
Foreword
Introduction
1 Scope
2 Normative references
3 Terms, definitions and abbreviated terms
    3.1 Terms and definitions
    3.2 Abbreviated terms

4 Information requirements
   4.1 Required AM ARM
   4.2 ARM type definitions
   4.3 ARM entity definitions
   4.4 ARM function definition
5 Module interpreted model
   5.1 Mapping specification
   5.2 MIM EXPRESS short listing

A MIM short names
B Information object registration
C ARM EXPRESS-G   EXPRESS-G
D MIM EXPRESS-G   EXPRESS-G
E Computer interpretable listings
F Change history
Bibliography
Index

4 Information requirements

This clause specifies the information requirements for the Extended date application module. The information requirements are specified as the Application Reference Model (ARM) of this application module.

NOTE 1  A graphical representation of the information requirements is given in Annex C.

NOTE 2  The mapping specification is specified in 5.1. It shows how the information requirements are met by using common resources and constructs defined or imported in the MIM schema of this application module.

This clause defines the information requirements to which implementations shall conform using the EXPRESS language as defined in ISO 10303-11. The following begins the Extended_date_arm schema and identifies the necessary external references.

EXPRESS specification:

*)
SCHEMA Extended_date_arm;
(*

4.1 Required AM ARM

The following EXPRESS interface statement specifies the elements imported from the ARM of another application module.

EXPRESS specification:

*)
USE FROM Date_time_arm;    --  ISO/TS 10303-1010
(*

NOTE 1   The schemas referenced above are specified in the following part of ISO 10303:

Date_time_arm ISO/TS 10303-1010

NOTE 2   See Annex C, Figures C.1and C.2 for a graphical representation of this schema.

4.2 ARM type definitions

This subclause specifies the ARM types for this application module. The ARM types and definitions are specified below.

4.2.1 date_or_date_time_select   EXPRESS-G

The date_or_date_time_select type is an extensible list of alternate data types that allows for the designation of the data types Calendar_date, Date_time, Year_month, Date, Ordinal_date and Week_of_year_and_day_date.

NOTE   The list of entity data types may be extended in application modules that use the constructs of this module.

EXPRESS specification:

*)
TYPE date_or_date_time_select = EXTENSIBLE GENERIC_ENTITY SELECT
   (Calendar_date,
    Date_time,
    Year_month,
    Date,
    Ordinal_date,
    Week_of_year_and_day_date);
END_TYPE;
(*

4.2.2 date_select   EXPRESS-G

The date_select type allows for the designation of the data types Calendar_date, Year_month, Date, Ordinal_date and Week_of_year_and_day_date.

EXPRESS specification:

*)
TYPE date_select = SELECT
   (Calendar_date,
    Year_month,
    Date,
    Ordinal_date,
    Week_of_year_and_day_date);
END_TYPE;
(*

4.2.3 day_in_week_number   EXPRESS-G

A day_in_week_number is the position of a specified day in a week.

EXPRESS specification:

*)
TYPE day_in_week_number = INTEGER;
WHERE
  WR1: { 1 <= SELF <= 7 };
END_TYPE;
(*

Formal propositions:

WR1: The value of the integer number shall be between 1 to 7.

4.2.4 day_in_year_number   EXPRESS-G

A day_in_year_number is the position of a specified day in a year.

EXPRESS specification:

*)
TYPE day_in_year_number = INTEGER;
WHERE
  WR1: {1 <= SELF <= 366};
END_TYPE;
(*

Formal propositions:

WR1: The value of the integer number shall be between 1 to 366.

4.2.5 week_in_year_number   EXPRESS-G

A week_in_year_number is the position of a specified week in a year.

EXPRESS specification:

*)
TYPE week_in_year_number = INTEGER;
WHERE
  WR1: { 1 <= SELF <= 53 };
END_TYPE;
(*

Formal propositions:

WR1: The value of the integer number shall be between 1 to 53.

4.3 ARM entity definitions

This subclause specifies the ARM entities for this module. Each ARM application entity is an atomic element that embodies a unique application concept and contains attributes specifying the data elements of the entity. The ARM entities and definitions are specified below.

4.3.1 Date   EXPRESS-GMapping table

A Date is an identification of a calendar year.

EXPRESS specification:

*)
ENTITY Date;
  year_component : year_number;
END_ENTITY;
(*

Attribute definitions:

year_component: the year elements of the Date.

4.3.2 Ordinal_date   EXPRESS-GMapping table

An Ordinal_date is an identification of an ordinal day in a calendar year.

EXPRESS specification:

*)
ENTITY Ordinal_date;
  day_component : day_in_year_number;
  year_component : year_number;
WHERE
  WR1: ( NOT leap_year ( SELF . year_component ) AND { 1 <= day_component <= 365 } ) OR ( leap_year ( SELF . year_component ) AND { 1 <= day_component <= 366 } );
END_ENTITY;
(*

Attribute definitions:

day_component: the day elements of the Ordinal_date.

year_component: the year elements of the Ordinal_date.

Formal propositions:

WR1: The day_component shall be between 1 and 365 if the year_component is not a leap year. Otherwise the day_component shall be between 1 and 366.

4.3.3 Week_of_year_and_day_date   EXPRESS-GMapping table

A Week_of_year_and_day_date is an identification of a week and a week day in a calendar year.

EXPRESS specification:

*)
ENTITY Week_of_year_and_day_date;
  day_component : OPTIONAL day_in_week_number;
  year_component : year_number;
  week_component : week_in_year_number;
END_ENTITY;
(*

Attribute definitions:

day_component: the day elements of the Week_of_year_and_day_date. The value of this attribute need not be specified.

year_component: the year elements of the Week_of_year_and_day_date.

week_component: the week elements of the Week_of_year_and_day_date.

4.3.4 Year_month   EXPRESS-GMapping table

A Year_month is an identification of a month in a calendar year.

EXPRESS specification:

*)
ENTITY Year_month;
  month_component : month_in_year_number;
  year_component : year_number;
END_ENTITY;
(*

Attribute definitions:

month_component: the month element of the Year_month.

year_component: the year element of the Year_month.

4.4 ARM function definition

This subclause specifies the ARM function for this module. The ARM function and definition is specified below.

4.4.1 leap_year

The leap_year function determines whether a given year is a leap year or not according to the Gregorian calendar algorithm. It returns TRUE if the year is a leap year. Otherwise, it returns FALSE.

EXPRESS specification:

*)
FUNCTION leap_year (year : year_number) : BOOLEAN;
IF ( ( ( ( year MOD  4 ) = 0 ) AND 
        ( ( year MOD  100 ) <> 0 ) ) OR ( ( year MOD 400 ) = 0 ) ) 
        THEN 
          RETURN  ( TRUE ) ; 
        ELSE 
          RETURN ( FALSE ) ; 
      END_IF ;
END_FUNCTION;
(*

Argument definitions:

year: the candidate year_number that is being checked.



*)
END_SCHEMA;  -- Extended_date_arm
(*


© ISO 2014 — All rights reserved