Returns an int32 tensor of ordinals. Ordinal is the number of days since 1st Jan 0001. #### Example ```python dates = tff.datetime.dates_from_tuples([(2019, 3, 25), (1, 1, 1)]) dates.ordinal() # [737143, 1] ```
(self)
| 164 | return self._years |
| 165 | |
| 166 | def ordinal(self): |
| 167 | """Returns an int32 tensor of ordinals. |
| 168 | |
| 169 | Ordinal is the number of days since 1st Jan 0001. |
| 170 | |
| 171 | #### Example |
| 172 | |
| 173 | ```python |
| 174 | dates = tff.datetime.dates_from_tuples([(2019, 3, 25), (1, 1, 1)]) |
| 175 | dates.ordinal() # [737143, 1] |
| 176 | ``` |
| 177 | """ |
| 178 | return self._ordinals |
| 179 | |
| 180 | def to_tensor(self): |
| 181 | """Packs the dates into a single Tensor. |
no outgoing calls