Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
ffm-baseline
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ML
ffm-baseline
Commits
e683b114
Commit
e683b114
authored
Sep 03, 2018
by
高雅喆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
space to tab
parent
69aa7b29
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
utils.py
eda/gray_stat/utils.py
+10
-10
No files found.
eda/gray_stat/utils.py
View file @
e683b114
...
...
@@ -36,18 +36,18 @@ def get_yesterday_date():
yesterday
=
yesterday
.
strftime
(
"
%
Y-
%
m-
%
d"
)
return
yesterday
def
get
BetweenD
ay
(
begin_date
,
end_date
):
def
get
_between_d
ay
(
begin_date
,
end_date
):
#获取指定时间范围内的date
"""
type begin_date : str eg:'2018-08-29'
type end_date : str eg:'2018-09-01'
rtype : list eg:['2018-08-29','2018-08-30','2018-08-31','2018-09-01']
"""
date_list
=
[]
begin_date
=
datetime
.
datetime
.
strptime
(
begin_date
,
"
%
Y-
%
m-
%
d"
)
end_date
=
datetime
.
datetime
.
strptime
(
end_date
,
"
%
Y-
%
m-
%
d"
)
while
begin_date
<=
end_date
:
date_str
=
begin_date
.
strftime
(
"
%
Y-
%
m-
%
d"
)
date_list
.
append
(
date_str
)
begin_date
+=
datetime
.
timedelta
(
days
=
1
)
return
date_list
\ No newline at end of file
date_list
=
[]
begin_date
=
datetime
.
datetime
.
strptime
(
begin_date
,
"
%
Y-
%
m-
%
d"
)
end_date
=
datetime
.
datetime
.
strptime
(
end_date
,
"
%
Y-
%
m-
%
d"
)
while
begin_date
<=
end_date
:
date_str
=
begin_date
.
strftime
(
"
%
Y-
%
m-
%
d"
)
date_list
.
append
(
date_str
)
begin_date
+=
datetime
.
timedelta
(
days
=
1
)
return
date_list
\ No newline at end of file
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