astro py:docs

- Index
- Modules

### Navigation

- next »
- « previous |
- Astropy v0.3 »
- Time and Dates (`astropy.time`) »
- TimeDelta

# TimeDelta

class `astropy.time.core.``TimeDelta`(val, val2=None, format=None, scale=None, copy=False)

  Bases: `astropy.time.core.Time`

  Represent the time difference between two times.

  A TimeDelta object is initialized with one or more times in the `val` argument. The input times in `val` must conform to the specified `format`. The optional `val2` time input should be supplied only for numeric input formats (e.g. JD) where very high precision (better than 64-bit precision) is required.

  Parameters:

  val : numpy ndarray, list, str, number, or `TimeDelta` object

  > Data to initialize table.

  val2 : numpy ndarray, list, str, or number; optional

  > Data to initialize table.

  format : str, optional

  > Format of input value(s)

  scale : str, optional

  > Time scale of input value(s)

  copy : bool, optional

  > Make a copy of the input values

  Attributes Summary

  `FORMATS` |
  `SCALES` | tuple() -> empty tuple

  Methods Summary

  `to`(*args, **kwargs) |

  Attributes Documentation

  `FORMATS` = {u'jd': <class 'astropy.time.core.TimeDeltaJD'>, u'sec': <class 'astropy.time.core.TimeDeltaSec'>}

    Dict of time delta formats

  `SCALES` = (u'tai',)

    List of time delta scales

  Methods Documentation

  `to`(*args, **kwargs)