MotoHawk DateTime Unit Delay
This block is a unit delay for dates and timespans.
Block ID
DateTime Unit Delay
Library
motohawk_datetime_lib/Date/Time Blocks
Description
This block is a unit delay for dates and timespans.
The "default" field expects a MATLAB structure definition:
A date would look like the following:
struct('year', number, 'month', number, 'day', number, 'hour', number, 'minute',
number, 'second', number, 'microsecond', number)
All fields must be specified with unsigned integer data type.
A timespan would look like the following:
struct('days', number, 'hours', number, 'minutes', number, 'seconds', number, 'microseconds',
number)
All fields must be specified with signed integer data type.
The date type is based on the content of the structure.
These scripts help define these data types:
>> help motohawk_datetime_matlabtime2datestruct
>> help motohawk_datetime_matlabtime2timespanstruct
The input port can be connected to a scalar or a vector of type datetime_T or timepan_T. The output port must have the same dimension as the input port. If the ports are connected to vector, then the Default parameter's evaluated value is assigned to each member of the vector. There is no need to specify the Default as a vector.
Block Parameters
Parameter Field | Values | Comments/Description |
---|---|---|
Default | Expression | Expression must be a valid TimeSpan or DateTime structure. |
Data Type | Dropdown | Data Type can be one of the three options : Inherit from 'Default', TimeSpan, or DateTime |