@@ -158,15 +158,8 @@ def f(self):
158
158
# these return a boolean by-definition
159
159
return result
160
160
161
- if field in self ._object_ops :
162
- result = fields .get_date_name_field (values , field , reso = self ._creso )
163
- result = self ._maybe_mask_results (result , fill_value = None )
164
-
165
- else :
166
- result = fields .get_date_field (values , field , reso = self ._creso )
167
- result = self ._maybe_mask_results (
168
- result , fill_value = None , convert = "float64"
169
- )
161
+ result = fields .get_date_field (values , field , reso = self ._creso )
162
+ result = self ._maybe_mask_results (result , fill_value = None , convert = "float64" )
170
163
171
164
return result
172
165
@@ -243,7 +236,6 @@ def _scalar_type(self) -> type[Timestamp]:
243
236
"is_year_end" ,
244
237
"is_leap_year" ,
245
238
]
246
- _object_ops : list [str ] = ["freq" , "tz" ]
247
239
_field_ops : list [str ] = [
248
240
"year" ,
249
241
"month" ,
@@ -264,7 +256,7 @@ def _scalar_type(self) -> type[Timestamp]:
264
256
]
265
257
_other_ops : list [str ] = ["date" , "time" , "timetz" ]
266
258
_datetimelike_ops : list [str ] = (
267
- _field_ops + _object_ops + _bool_ops + _other_ops + ["unit" ]
259
+ _field_ops + _bool_ops + _other_ops + ["unit" , "freq" , "tz " ]
268
260
)
269
261
_datetimelike_methods : list [str ] = [
270
262
"to_period" ,
0 commit comments