def reltime(taxis, startdate=None, units=None):
    """ Returns time axis values relative to a given reference date. The units can be
  be specified, if none are given the units of the given time axis are used."""
    if units is None:
        units = taxis.units
    return taxis.date_as_val(startdate=startdate, units=units)
