EXPRESS Definition for IfcDateTimeResource

Link to Documentation

Documentation

Link to EXPRESS-G Diagram

EXPRESS-G Diagram



SCHEMA IfcDateTimeResource;


IfcDayInMonthNumber

Link to Documentation

Documentation


TYPE IfcDayInMonthNumber = INTEGER;
END_TYPE;


IfcDaylightSavingNumber

Link to Documentation

Documentation


TYPE IfcDaylightSavingNumber = INTEGER;
  WHERE
    WR1: { 0 <= SELF <= 2 };
END_TYPE;


IfcHourInDay

Link to Documentation

Documentation


TYPE IfcHourInDay = INTEGER;
  WHERE
    WR1: { 0 <= SELF < 24 };
END_TYPE;


IfcMinuteInHour

Link to Documentation

Documentation


TYPE IfcMinuteInHour = INTEGER;
  WHERE
    WR1: {0 <= SELF <= 59 };
END_TYPE;


IfcMonthInYearNumber

Link to Documentation

Documentation


TYPE IfcMonthInYearNumber = INTEGER;
  WHERE
    WR1: { 1<= SELF <= 12 };
END_TYPE;


IfcSecondInMinute

Link to Documentation

Documentation


TYPE IfcSecondInMinute = REAL;
  WHERE
    WR1: { 0 <= SELF < 60 };
END_TYPE;


IfcYearNumber

Link to Documentation

Documentation


TYPE IfcYearNumber = INTEGER;
END_TYPE;


IfcDateTimeSelect

Link to Documentation

Documentation


TYPE IfcDateTimeSelect = SELECT (
    IfcCalendarDate
   ,IfcLocalTime
   ,IfcDateAndTime);
END_TYPE;


IfcAheadOrBehind

Link to Documentation

Documentation


TYPE IfcAheadOrBehind = ENUMERATION OF (
    Ahead
   ,Behind);
END_TYPE;


IfcCalendarDate

Link to Documentation

Documentation


ENTITY IfcCalendarDate;
    DayComponent   : IfcDayInMonthNumber;
    MonthComponent : IfcMonthInYearNumber;
    YearComponent  : IfcYearNumber;
  WHERE
    WR21: IfcValidCalendarDate (SELF);
END_ENTITY;


IfcCoordinatedUniversalTimeOffset

Link to Documentation

Documentation


ENTITY IfcCoordinatedUniversalTimeOffset;
    HourOffset   : IfcHourInDay;
    MinuteOffset : OPTIONAL IfcMinuteInHour;
    Sense        : IfcAheadOrBehind;
END_ENTITY;


IfcDateAndTime

Link to Documentation

Documentation


ENTITY IfcDateAndTime;
    DateComponent : IfcCalendarDate;
    TimeComponent : IfcLocalTime;
END_ENTITY;


IfcLocalTime

Link to Documentation

Documentation


ENTITY IfcLocalTime;
    HourComponent        : IfcHourInDay;
    MinuteComponent      : OPTIONAL IfcMinuteInHour;
    SecondComponent      : OPTIONAL IfcSecondInMinute;
    Zone                 : OPTIONAL IfcCoordinatedUniversalTimeOffset;
    DaylightSavingOffset : OPTIONAL IfcDaylightSavingNumber;
  WHERE
    WR21: IfcValidTime (SELF);
END_ENTITY;


IfcLeapYear


FUNCTION IfcLeapYear
(Year : IfcYearNumber)
              : 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;


IfcValidCalendarDate


FUNCTION IfcValidCalendarDate
(Date : IfcCalendarDate)
              : LOGICAL;

  IF NOT ({1 <= Date.DayComponent <= 31}) THEN
    RETURN(FALSE);
  END_IF;
  CASE Date.MonthComponent OF
    4         : RETURN({ 1<= Date.DayComponent <= 30});
    6         : RETURN({ 1<= Date.DayComponent <= 30});
    9         : RETURN({ 1<= Date.DayComponent <= 30});
    11        : RETURN({ 1<= Date.DayComponent <= 30});
    2         :
    BEGIN
      IF (IfcLeapYear(Date.YearComponent)) THEN
        RETURN({ 1<= Date.DayComponent <= 29});
      ELSE
        RETURN({ 1<= Date.DayComponent <= 28});
      END_IF;
    END;
    OTHERWISE : RETURN(TRUE);
  END_CASE;
END_FUNCTION;


IfcValidTime


FUNCTION IfcValidTime
(Time: IfcLocalTime) : BOOLEAN;
  IF EXISTS (Time.SecondComponent) THEN
    RETURN (EXISTS (Time.MinuteComponent));
  ELSE
    RETURN (TRUE);
  END_IF;
END_FUNCTION;



END_SCHEMA;