RWTimeTuple and RWTimeTupleOffset
RWTimeTuple and RWTimeTupleOffset store dates and times, similar to RWDateTime, offering precision to a picosecond, as opposed to RWDateTime’s millisecond precision. In addition, they have no ability to perform calculations or comparisons.
These classes may offer an effective alternative to
RWDateTime if you just need to get a date/time from a database and have no need to perform calculations or comparisons.
You need to perform calculations or comparisons on dates and times.
Memory and space is a consideration. An
RWDateTime instance stores dates and times in a single component, so takes up less space than an
RWTimeTuple or
RWTimeTupleOffset which store each date and time component in a separate field.
You have no need of picosecond precision.
You need to simply access the year, month, day, or picosecond, and do not need to perform calculations or comparisons.
System resources are a consideration. Due to their sparse design,
RWTimeTuple or
RWTimeTupleOffset can read and write to and from a database more quickly, providing better performance.
You need picosecond precision.
As their names suggest,
RWTimeTuple represents a local date/time and does not hold a UTC offset. If you need a specific time/date based on a locale or DST, use
RWTimeTupleOffset.