Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
bdc
/
bdcjg-web
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
44f7ea61
authored
2023-02-07 17:59:15 +0800
by
yangwei
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
时间格式化方法
1 parent
bddcf056
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
src/utils/operation.js
src/utils/operation.js
View file @
44f7ea6
...
...
@@ -111,14 +111,18 @@ export function down (index, data) {
}
}
export
function
timeFormat
(
date
)
{
export
function
timeFormat
(
date
,
end
)
{
if
(
!
date
||
typeof
(
date
)
===
"string"
)
{
this
.
error
(
"参数异常,请检查..."
);
}
var
y
=
date
.
getFullYear
();
//年
var
m
=
date
.
getMonth
()
+
1
;
//月
var
d
=
date
.
getDate
();
//日
if
(
end
)
{
return
y
+
"/"
+
m
+
"/"
+
d
+
' 23:59:59'
;
}
else
{
return
y
+
"/"
+
m
+
"/"
+
d
+
' 00:00:00'
;
}
}
export
function
getFirstDayOfSeason
(
d
)
{
let
date
=
d
||
new
Date
()
...
...
Please
register
or
sign in
to post a comment