Template:— representing_date_time (rep_date_time) Date: 2008/03/04 23:11:32
Revision: 1.17

This section specifies the template representing_date_time.

NOTE  An explanation of a template and the associated instantiation path is provided in the Template overview section.

Description

This template describes how to represent a Date_time.

Model diagrams
The EXPRESS-G diagram in Figure 1 shows the templates and EXPRESS entities that are required to represent the template "representing_date_time". The text highlighted in blue shows the template parameters.


Figure 1 —  An EXPRESS-G representation of the Information model for representing_date_time

Figure 1 —  An EXPRESS-G representation of the Information model for representing_date_time

The graphic for the template to be used in other EXPRESS-G diagrams is shown in Figure  2 below.


Figure 2 —  
                      The graphical representation of representing_date_time template

Figure 2 —   The graphical representation of representing_date_time template

Input parameters
The following input parameters are defined for this template:
year (Type= 'TYPE (year_number)' )
Calendar_date year_component of the date and time.
month (Type= 'TYPE (month_in_year_number)' )
Calendar_date month_component of the date and time.
day (Type= 'TYPE (day_in_month_number)' )
Calendar_date day_component of the date and time.
hour (Type= 'TYPE (hour_in_day)' )
Local_time hour_component of the date and time.
minute (Type= 'TYPE (minute_in_hour)' , Optional)
Local_time minute_component of the date and time. This parameter is optional. If not given, it will remain unset.
second (Type= 'TYPE (second_in_minute)' , Optional)
Local_time second_component of the date and time. This parameter is optional. If not given, it will remain unset.
sense (Type= 'TYPE (offset_orientation)' )
The direction of the offset. Type (Enumeration) values are: 'ahead', 'exact' or 'behind'.
hour_offset (Type='INTEGER')
The number of hours by which a time is offset from Coordinated Universal Time.
minute_offset (Type='INTEGER', Optional)
The number of minutes by which a time is offset from Coordinated Universal Time. The value of this attribute need not be specified. This parameter is optional. If not given, it will remain unset.
Reference parameters
The following reference parameters are defined for this template:
date_time(Type='ENTITY (Date_time)')
Allow the Date_time entity instantiated in this path to be referenced when this template is used.
Note: The Date_time entity can be referenced in a template path by:
%^target = $representing_date_time.date_time%
where target is the parameter to which the Date_time is bound.
time_offset(Type='ENTITY (Time_offset)')
Allow the Time_offset entity instantiated in this path to be referenced when this template is used.
Note: The Time_offset entity can be referenced in a template path by:
%^target = $representing_date_time.time_offset%
where target is the parameter to which the Time_offset is bound.
calendar_date(Type='ENTITY (Calendar_date)')
Allow the Calendar_date entity instantiated in this path to be referenced when this template is used.
Note: The Calendar_date entity can be referenced in a template path by:
%^target = $representing_date_time.calendar_date%
where target is the parameter to which the Calendar_date is bound.
Uniqueness constraints

The following parameter combinations specify a uniqueness constraint:
Unique constraint: Unique calendar date
Each instance of the entity (Calendar_date) within the data set shall be uniquely identified by a combination of the following parameters on this template (representing_date_time) namely: year, month, day.
The instance is referenced by the following template parameter: calendar_date.
Unique constraint: Unique time offset
Each instance of the entity (Time_offset) within the data set shall be uniquely identified by a combination of the following parameters on this template (representing_date_time) namely: hour_offset, minute_offset, sense.
The instance is referenced by the following template parameter: time_offset.
Instantiation path
The instantiation path shown below specifies the entities that are to be instantiated by the template.
A description of templates and the syntax for the instantiation path is provided in the Templates Help/Information section.
-- Instantiate Date_time entity
Date_time

-- Bind the Date_time to the parameter ^date_time.
-- The parameter is a reference parameter so the Date_time
-- entity can be referred to when this template is used.
%^date_time = Date_time%

-- Instantiate Calendar_date and point at it
Date_time.date_component -> Calendar_date

-- Instantiate Local_time and point at it
Date_time.time_component -> Local_time

-- Instantiate Time_offset and point at it
Local_time.zone -> Time_offset

-- Bind the Time_offset to the parameter ^time_offset.
-- The parameter is a reference parameter so the Time_offset
-- entity can be referred to when this template is used.
%^time_offset = Time_offset%

-- Set the Calendar_date attributes
Calendar_date.year_component -> @year
Calendar_date.month_component -> @month
Calendar_date.day_component -> @day

-- Bind the Calendar_date to the parameter ^calendar_date.
-- The parameter is a reference parameter so the Calendar_date
-- entity can be referred to when this template is used.
%^calendar_date = Calendar_date%

-- Set the Local_time attributes
Local_time.hour_component -> @hour
Local_time.minute_component -> @minute
Local_time.second_component -> @second

-- Set the Time_offset attributes
Time_offset.sense -> @sense
Time_offset.hour_offset -> @hour_offset
Time_offset.minute_offset -> @minute_offset
Instance diagrams
The instance diagram in Figure  3 shows an example of the EXPRESS entities and templates that are instantiated by the template:
/representing_date_time(year='2005', month='11', day='22', hour='15', minute='12', second='00', sense='exact', hour_offset='0', minute_offset='0')/
(an illustration of the consolidated representing_date_time template is shown in Figure 4 below.)


Figure 3 —  Entities instantiated by representing_date_time template

Figure 3 —  Entities instantiated by representing_date_time template

The instance diagram in Figure 4 shows the graphic symbol for the template that is to be used in other instance diagrams. The example template is:
/representing_date_time(year='2005', month='11', day='22', hour='15', minute='12', second='00', sense='exact', hour_offset='0', minute_offset='0')/


Figure 4 —  Instantiation of representing_date_time template

Figure 4 —  Instantiation of representing_date_time template

Characterizations
No common characterizations of the template representing_date_time have been identified. However, the ISO 10303-239 EXPRESS model may enable other assignments to the entities instantiated by the template.

© OASIS 2010 — All rights reserved