Class SplitDateTimeVariableValue

All Implemented Interfaces:
ActionListener, FocusListener, PropertyChangeListener, EventListener

public class SplitDateTimeVariableValue
extends SplitVariableValue
Like SplitVariableValue, except that the string representation is a date and time relative to a given epoch start date.
  • A base attribute is required to indicate the epoch (zero) date and must be in XML dateTime format "YYYY-MM-DDThh:mm:ss"(all components are required). For example, the RailCom (S9.3.2) epoch is "2000-01-01T00:00:00", while the Java epoch is "1970-01-01T00:00:00"
  • A unit attribute specifies the time unit of the value stored in the CVs. The default is "Seconds" and the available units are "Nanos", "Micros", "Millis", "Seconds", "Minutes", "Hours", "HalfDays", "Days", "Weeks", "Months", "Years", "Decades", "Centuries", "Millennia" as per ChronoUnit.values()
  • A factor attribute can be used to specify that the stored value is in multiples of a unit. For example, if the stored value is in tenths of a second, use unit="Millis", factor="100". Large values of factor should be avoided, due to the possibility of multiplication overflow.
  • A display attribute specifies the what is returned in the string representation The default is to return both date and time and the available displays are "dateOnly", "timeOnly" and "default".
Due to the difficulties in parsing date and time values, together with the loss of information in the display format and back conversion, the string representation will always be readOnly, even though the underlying CV values may not be readOnly.