@@ -2546,7 +2546,6 @@ cdef class MonthEnd(MonthOffset):
2546
2546
DateOffset of one month end.
2547
2547
2548
2548
MonthEnd goes to the next date which is an end of the month.
2549
- To get the end of the current month pass the parameter n equals 0.
2550
2549
2551
2550
See Also
2552
2551
--------
@@ -2562,10 +2561,10 @@ cdef class MonthEnd(MonthOffset):
2562
2561
>>> ts + pd.offsets.MonthEnd()
2563
2562
Timestamp('2022-02-28 00:00:00')
2564
2563
2565
- If you want to get the end of the current month pass the parameter n equals 0 :
2564
+ If you want to get the end of the current month:
2566
2565
2567
2566
>>> ts = pd.Timestamp(2022, 1, 31)
2568
- >>> ts + pd.offsets.MonthEnd(0 )
2567
+ >>> pd.offsets.MonthEnd().rollforward(ts )
2569
2568
Timestamp('2022-01-31 00:00:00')
2570
2569
"""
2571
2570
_period_dtype_code = PeriodDtypeCode.M
@@ -2578,7 +2577,6 @@ cdef class MonthBegin(MonthOffset):
2578
2577
DateOffset of one month at beginning.
2579
2578
2580
2579
MonthBegin goes to the next date which is a start of the month.
2581
- To get the start of the current month pass the parameter n equals 0.
2582
2580
2583
2581
See Also
2584
2582
--------
@@ -2594,10 +2592,10 @@ cdef class MonthBegin(MonthOffset):
2594
2592
>>> ts + pd.offsets.MonthBegin()
2595
2593
Timestamp('2023-01-01 00:00:00')
2596
2594
2597
- If you want to get the start of the current month pass the parameter n equals 0 :
2595
+ If you want to get the start of the current month:
2598
2596
2599
2597
>>> ts = pd.Timestamp(2022, 12, 1)
2600
- >>> ts + pd.offsets.MonthBegin(0 )
2598
+ >>> pd.offsets.MonthBegin().rollback(ts )
2601
2599
Timestamp('2022-12-01 00:00:00')
2602
2600
"""
2603
2601
_prefix = " MS"
@@ -2609,7 +2607,6 @@ cdef class BusinessMonthEnd(MonthOffset):
2609
2607
DateOffset increments between the last business day of the month.
2610
2608
2611
2609
BusinessMonthEnd goes to the next date which is the last business day of the month.
2612
- To get the last business day of the current month pass the parameter n equals 0.
2613
2610
2614
2611
Examples
2615
2612
--------
@@ -2621,11 +2618,10 @@ cdef class BusinessMonthEnd(MonthOffset):
2621
2618
>>> ts + pd.offsets.BMonthEnd()
2622
2619
Timestamp('2022-12-30 00:00:00')
2623
2620
2624
- If you want to get the end of the current business month
2625
- pass the parameter n equals 0:
2621
+ If you want to get the end of the current business month:
2626
2622
2627
2623
>>> ts = pd.Timestamp(2022, 11, 30)
2628
- >>> ts + pd.offsets.BMonthEnd(0 )
2624
+ >>> pd.offsets.BMonthEnd().rollforward(ts )
2629
2625
Timestamp('2022-11-30 00:00:00')
2630
2626
"""
2631
2627
_prefix = " BM"
@@ -2637,8 +2633,7 @@ cdef class BusinessMonthBegin(MonthOffset):
2637
2633
DateOffset of one month at the first business day.
2638
2634
2639
2635
BusinessMonthBegin goes to the next date which is the first business day
2640
- of the month. To get the first business day of the current month pass
2641
- the parameter n equals 0.
2636
+ of the month.
2642
2637
2643
2638
Examples
2644
2639
--------
@@ -2650,11 +2645,10 @@ cdef class BusinessMonthBegin(MonthOffset):
2650
2645
>>> ts + pd.offsets.BMonthBegin()
2651
2646
Timestamp('2023-01-02 00:00:00')
2652
2647
2653
- If you want to get the start of the current business month pass
2654
- the parameter n equals 0:
2648
+ If you want to get the start of the current business month:
2655
2649
2656
2650
>>> ts = pd.Timestamp(2022, 12, 1)
2657
- >>> ts + pd.offsets.BMonthBegin(0 )
2651
+ >>> pd.offsets.BMonthBegin().rollback(ts )
2658
2652
Timestamp('2022-12-01 00:00:00')
2659
2653
"""
2660
2654
_prefix = " BMS"
0 commit comments