4.1 datetime Class

A datetime is an array object that represents points in time in the familiar Gregorian calendar.

This is an attempt to reproduce the functionality of Matlab’s datetime. It also contains some Octave-specific extensions.

The underlying representation is that of a datenum (a double containing the number of days since the Matlab epoch), but encapsulating it in an object provides several benefits: friendly human-readable display, type safety, automatic type conversion, and time zone support. In addition to the underlying datenum array, a datetime inclues an optional TimeZone property indicating what time zone the datetimes are in.

So, basically, a datetime is an object wrapper around a datenum array, plus time zone support.