Application module: Extended date | ISO/TS 10303-1776:2014-02(E) © ISO |
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;
(*
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.
This subclause specifies the ARM types for this application module. The ARM types and definitions are specified below.
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;
(*
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;
(*
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.
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.
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.
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.
EXPRESS specification:
*)
ENTITY Date;
year_component : year_number;
END_ENTITY;
(*
Attribute definitions:
year_component: the year elements of the Date.
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.
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.
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.
This subclause specifies the ARM function for this module. The ARM function and definition is specified below.
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