Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
U
unify_api2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chaonan
unify_api2
Commits
50c32647
Commit
50c32647
authored
Jul 30, 2024
by
ZZH
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix is_workday, is_holiday 2024-07-30
parent
2068ea7f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
common_utils.py
unify_api/utils/common_utils.py
+8
-2
No files found.
unify_api/utils/common_utils.py
View file @
50c32647
...
@@ -113,10 +113,16 @@ class ChineseCalendar:
...
@@ -113,10 +113,16 @@ class ChineseCalendar:
date_str
:
str
date_str
:
str
def
is_workday
(
self
)
->
bool
:
def
is_workday
(
self
)
->
bool
:
return
is_workday
(
datetime
.
strptime
(
self
.
date_str
,
"
%
Y-
%
m-
%
d"
))
try
:
return
is_workday
(
datetime
.
strptime
(
self
.
date_str
,
"
%
Y-
%
m-
%
d"
))
except
Exception
as
e
:
return
False
def
is_holiday
(
self
)
->
bool
:
def
is_holiday
(
self
)
->
bool
:
return
is_holiday
(
datetime
.
strptime
(
self
.
date_str
,
"
%
Y-
%
m-
%
d"
))
try
:
return
is_holiday
(
datetime
.
strptime
(
self
.
date_str
,
"
%
Y-
%
m-
%
d"
))
except
Exception
as
e
:
return
False
def
multiplication_two
(
a
,
b
):
def
multiplication_two
(
a
,
b
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment