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

(*
ISO TC184/SC4/WG12 N8011 - ISO/TS 10303-1776 Extended date - EXPRESS ARM
Supersedes ISO TC184/SC4/WG12 N5368
*)



SCHEMA Extended_date_arm;

USE FROM Date_time_arm;    -- ISO/TS 10303-1010


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;

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

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

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

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

ENTITY Date;
  year_component : year_number;
END_ENTITY;

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;

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;

ENTITY Year_month;
  month_component : month_in_year_number;
  year_component : year_number;
END_ENTITY;

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;

END_SCHEMA;  -- Extended_date_arm


© ISO 2014 — All rights reserved