TimeObject

TimeObject[]

represents the current time.

TimeObject[{h,m,s}]

represents a time object of standard normalized form.

TimeObject[date]

gives the time component of the specified date representation.

Details and Options

  • TimeObject[] uses whatever time has been set on your computer system by default.
  • Shorter lists can be used in TimeObject[{h,m,s}], which represents the time to whatever accuracy is specified: {h} is not treated as being equivalent to {h,0,0}.
  • TimeObject allows addition and subtraction of time quantities.
  • Subtracting two TimeObject constructs yields a time quantity.
  • The following options can be given:
  • TimeZone$TimeZonetime zone being used
  • TimeZone specifications should be a numerical offset from GMT or a time zone string.

Examples

open allclose all

Basic Examples  (2)

Represent the current time:

In[1]:=
Click for copyable input
Out[1]=

Represent 11:30am:

In[2]:=
Click for copyable input
Out[2]=

Represent 15 seconds past 8:04pm:

In[3]:=
Click for copyable input
Out[3]=

Add 13 hours to a time object:

In[1]:=
Click for copyable input
Out[1]=

Subtracting time objects gives a time quantity:

In[2]:=
Click for copyable input
Out[2]=

Scope  (1)

Options  (1)

Properties & Relations  (1)

See Also

DateObject  Now  TimeZoneConvert  DateValue  DateString  DateList  TimeSeries  EventSeries  SiderealTime

Introduced in 2014
(10.0)