Skip to content

Commit 19a5f38

Browse files
Backport PR #52161 on branch 2.0.x (Docs/update issue 52106) (#52170)
Backport PR #52161: Docs/update issue 52106 Co-authored-by: Pranav Saibhushan Ravuri <[email protected]>
1 parent 1dfe01b commit 19a5f38

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

pandas/_libs/tslibs/offsets.pyx

+4-7
Original file line numberDiff line numberDiff line change
@@ -2543,7 +2543,6 @@ cdef class MonthEnd(MonthOffset):
25432543
DateOffset of one month end.
25442544
25452545
MonthEnd goes to the next date which is an end of the month.
2546-
To get the end of the current month pass the parameter n equals 0.
25472546
25482547
See Also
25492548
--------
@@ -2559,10 +2558,10 @@ cdef class MonthEnd(MonthOffset):
25592558
>>> ts + pd.offsets.MonthEnd()
25602559
Timestamp('2022-02-28 00:00:00')
25612560
2562-
If you want to get the end of the current month pass the parameter n equals 0:
2561+
If you want to get the end of the current month:
25632562
25642563
>>> ts = pd.Timestamp(2022, 1, 31)
2565-
>>> ts + pd.offsets.MonthEnd(0)
2564+
>>> pd.offsets.MonthEnd().rollforward(ts)
25662565
Timestamp('2022-01-31 00:00:00')
25672566
"""
25682567
_period_dtype_code = PeriodDtypeCode.M
@@ -2589,7 +2588,6 @@ cdef class BusinessMonthEnd(MonthOffset):
25892588
DateOffset increments between the last business day of the month.
25902589
25912590
BusinessMonthEnd goes to the next date which is the last business day of the month.
2592-
To get the last business day of the current month pass the parameter n equals 0.
25932591
25942592
Examples
25952593
--------
@@ -2601,11 +2599,10 @@ cdef class BusinessMonthEnd(MonthOffset):
26012599
>>> ts + pd.offsets.BMonthEnd()
26022600
Timestamp('2022-12-30 00:00:00')
26032601
2604-
If you want to get the end of the current business month
2605-
pass the parameter n equals 0:
2602+
If you want to get the end of the current business month:
26062603
26072604
>>> ts = pd.Timestamp(2022, 11, 30)
2608-
>>> ts + pd.offsets.BMonthEnd(0)
2605+
>>> pd.offsets.BMonthEnd().rollforward(ts)
26092606
Timestamp('2022-11-30 00:00:00')
26102607
"""
26112608
_prefix = "BM"

0 commit comments

Comments
 (0)