Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Element
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
林焕东
Element
Commits
71268c5b
Commit
71268c5b
authored
Sep 13, 2022
by
Due07
Committed by
GitHub
Sep 13, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Utils: update date-util.js (#22099)
Co-authored-by:
xulongtai
<
xulongtai@ganguo.hk
>
parent
acfc93a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
12 deletions
+2
-12
src/utils/date-util.js
src/utils/date-util.js
+2
-12
No files found.
src/utils/date-util.js
View file @
71268c5b
...
@@ -48,19 +48,9 @@ export const parseDate = function(string, format) {
...
@@ -48,19 +48,9 @@ export const parseDate = function(string, format) {
};
};
export
const
getDayCountOfMonth
=
function
(
year
,
month
)
{
export
const
getDayCountOfMonth
=
function
(
year
,
month
)
{
if
(
month
===
3
||
month
===
5
||
month
===
8
||
month
===
10
)
{
if
(
isNaN
(
+
month
))
return
31
;
return
30
;
}
if
(
month
===
1
)
{
if
(
year
%
4
===
0
&&
year
%
100
!==
0
||
year
%
400
===
0
)
{
return
29
;
}
else
{
return
28
;
}
}
return
31
;
return
new
Date
(
year
,
+
month
+
1
,
0
).
getDate
()
;
};
};
export
const
getDayCountOfYear
=
function
(
year
)
{
export
const
getDayCountOfYear
=
function
(
year
)
{
...
...
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