# xarray.CFTimeIndex.get_loc

#### CFTimeIndex.get_loc(key)[[source]](https://github.com/pydata/xarray/blob/main/xarray/coding/cftimeindex.py#L441-L449)

Get the location for a label.

Adapted from pandas.tseries.index.DatetimeIndex.get_loc.
