Skip to content

Commit 0d816ab

Browse files
authored
Update holiday.py
In the pandas/tseries/holiday.py file, the formatting of some word cases and punctuation marks differed from the formatting in other files and has been modified.
1 parent 6dff32e commit 0d816ab

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

pandas/tseries/holiday.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
def next_monday(dt: datetime) -> datetime:
4343
"""
4444
If holiday falls on Saturday, use following Monday instead;
45-
if holiday falls on Sunday, use Monday instead
45+
if holiday falls on Sunday, use Monday instead.
4646
"""
4747
if dt.weekday() == 5:
4848
return dt + timedelta(2)
@@ -55,7 +55,7 @@ def next_monday_or_tuesday(dt: datetime) -> datetime:
5555
"""
5656
For second holiday of two adjacent ones!
5757
If holiday falls on Saturday, use following Monday instead;
58-
if holiday falls on Sunday or Monday, use following Tuesday instead
58+
if holiday falls on Sunday or Monday, use following Tuesday instead.
5959
(because Monday is already taken by adjacent holiday on the day before)
6060
"""
6161
dow = dt.weekday()
@@ -113,7 +113,7 @@ def nearest_workday(dt: datetime) -> datetime:
113113

114114
def next_workday(dt: datetime) -> datetime:
115115
"""
116-
returns next workday used for observances
116+
Returns next workday used for observances
117117
"""
118118
dt += timedelta(days=1)
119119
while dt.weekday() > 4:
@@ -124,7 +124,7 @@ def next_workday(dt: datetime) -> datetime:
124124

125125
def previous_workday(dt: datetime) -> datetime:
126126
"""
127-
returns previous workday used for observances
127+
Returns previous workday used for observances
128128
"""
129129
dt -= timedelta(days=1)
130130
while dt.weekday() > 4:
@@ -135,15 +135,15 @@ def previous_workday(dt: datetime) -> datetime:
135135

136136
def before_nearest_workday(dt: datetime) -> datetime:
137137
"""
138-
returns previous workday before nearest workday
138+
Returns previous workday before nearest workday
139139
"""
140140
return previous_workday(nearest_workday(dt))
141141

142142

143143
def after_nearest_workday(dt: datetime) -> datetime:
144144
"""
145-
returns next workday after nearest workday
146-
needed for Boxing day or multiple holidays in a series
145+
Returns next workday after nearest workday
146+
Needed for Boxing day or multiple holidays in a series
147147
"""
148148
return next_workday(nearest_workday(dt))
149149

0 commit comments

Comments
 (0)