Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
3f0c9205
Commit
3f0c9205
authored
Dec 14, 2019
by
王昆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsb
parent
8e6f015e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
bpo-stat/app/base/service/sve.base.js
+23
-0
No files found.
bpo-stat/app/base/service/sve.base.js
View file @
3f0c9205
...
...
@@ -276,5 +276,27 @@ class ServiceBase {
return
u
;
}
getMonthDays
(
month
)
{
let
begin
=
moment
().
format
(
"YYYY-MM"
)
+
"-01 00:00:00"
;
let
end
=
moment
(
begin
).
add
(
1
,
"months"
).
subtract
(
1
,
'days'
).
format
(
"YYYY-MM-DD"
)
+
" 23:59:59"
;
return
this
.
getDays
(
end
);
}
getDays
(
end
)
{
var
days
=
[];
var
month
=
moment
(
end
).
format
(
"YYYY-MM"
);
var
endDay
=
Number
(
moment
(
end
).
format
(
"DD"
));
for
(
var
i
=
1
;
i
<=
endDay
;
i
++
)
{
if
(
i
<
10
)
{
days
.
push
(
month
+
"-0"
+
i
);
}
else
{
days
.
push
(
month
+
"-"
+
i
);
}
}
return
days
;
}
}
module
.
exports
=
ServiceBase
;
\ 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