@@ -200,8 +200,9 @@ class MinMaxReso:
200200
201201 See also: timedeltas.MinMaxReso
202202 """
203- def __init__ (self , name ):
203+ def __init__ (self , name , docstring ):
204204 self ._name = name
205+ self .__doc__ = docstring
205206
206207 def __get__ (self , obj , type = None ):
207208 cls = Timestamp
@@ -216,11 +217,15 @@ class MinMaxReso:
216217
217218 if obj is None :
218219 # i.e. this is on the class, default to nanos
219- return cls (val)
220+ result = cls (val)
220221 elif self ._name == " resolution" :
221- return Timedelta._from_value_and_reso(val, obj._creso)
222+ result = Timedelta._from_value_and_reso(val, obj._creso)
222223 else :
223- return Timestamp._from_value_and_reso(val, obj._creso, tz = None )
224+ result = Timestamp._from_value_and_reso(val, obj._creso, tz = None )
225+
226+ result.__doc__ = self .__doc__
227+
228+ return result
224229
225230 def __set__ (self , obj , value ):
226231 raise AttributeError (f" {self._name} is not settable." )
@@ -235,9 +240,74 @@ cdef class _Timestamp(ABCTimestamp):
235240 dayofweek = _Timestamp.day_of_week
236241 dayofyear = _Timestamp.day_of_year
237242
238- min = MinMaxReso(" min" )
239- max = MinMaxReso(" max" )
240- resolution = MinMaxReso(" resolution" ) # GH#21336, GH#21365
243+ _docstring_min = """
244+ Returns the minimum bound possible for Timestamp.
245+
246+ This property provides access to the smallest possible value that
247+ can be represented by a Timestamp object.
248+
249+ Returns
250+ -------
251+ Timestamp
252+
253+ See Also
254+ --------
255+ Timestamp.max: Returns the maximum bound possible for Timestamp.
256+ Timestamp.resolution: Returns the smallest possible difference between
257+ non-equal Timestamp objects.
258+
259+ Examples
260+ --------
261+ >>> pd.Timestamp.min
262+ Timestamp('1677-09-21 00:12:43.145224193')
263+ """
264+
265+ _docstring_max = """
266+ Returns the maximum bound possible for Timestamp.
267+
268+ This property provides access to the largest possible value that
269+ can be represented by a Timestamp object.
270+
271+ Returns
272+ -------
273+ Timestamp
274+
275+ See Also
276+ --------
277+ Timestamp.min: Returns the minimum bound possible for Timestamp.
278+ Timestamp.resolution: Returns the smallest possible difference between
279+ non-equal Timestamp objects.
280+
281+ Examples
282+ --------
283+ >>> pd.Timestamp.max
284+ Timestamp('2262-04-11 23:47:16.854775807')
285+ """
286+
287+ _docstring_reso = """
288+ Returns the smallest possible difference between non-equal Timestamp objects.
289+
290+ The resolution value is determined by the underlying representation of time
291+ units and is equivalent to Timedelta(nanoseconds=1).
292+
293+ Returns
294+ -------
295+ Timedelta
296+
297+ See Also
298+ --------
299+ Timestamp.max: Returns the maximum bound possible for Timestamp.
300+ Timestamp.min: Returns the minimum bound possible for Timestamp.
301+
302+ Examples
303+ --------
304+ >>> pd.Timestamp.resolution
305+ Timedelta('0 days 00:00:00.000000001')
306+ """
307+
308+ min = MinMaxReso(" min" , _docstring_min)
309+ max = MinMaxReso(" max" , _docstring_max)
310+ resolution = MinMaxReso(" resolution" , _docstring_reso) # GH#21336, GH#21365
241311
242312 @property
243313 def value (self ) -> int:
0 commit comments