Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
web-monitor
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
Administrator
web-monitor
Commits
8ab770e9
Commit
8ab770e9
authored
Dec 11, 2017
by
Pan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lint:format code
parent
bb0b37e0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
51 deletions
+51
-51
index.js
src/utils/index.js
+51
-51
No files found.
src/utils/index.js
View file @
8ab770e9
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* Created by jiachenpan on 16/11/18.
* Created by jiachenpan on 16/11/18.
*/
*/
export
function
parseTime
(
time
,
cFormat
)
{
export
function
parseTime
(
time
,
cFormat
)
{
if
(
arguments
.
length
===
0
)
{
if
(
arguments
.
length
===
0
)
{
return
null
return
null
}
}
...
@@ -32,9 +32,9 @@
...
@@ -32,9 +32,9 @@
return
value
||
0
return
value
||
0
})
})
return
time_str
return
time_str
}
}
export
function
formatTime
(
time
,
option
)
{
export
function
formatTime
(
time
,
option
)
{
time
=
+
time
*
1000
time
=
+
time
*
1000
const
d
=
new
Date
(
time
)
const
d
=
new
Date
(
time
)
const
now
=
Date
.
now
()
const
now
=
Date
.
now
()
...
@@ -55,4 +55,4 @@
...
@@ -55,4 +55,4 @@
}
else
{
}
else
{
return
d
.
getMonth
()
+
1
+
'月'
+
d
.
getDate
()
+
'日'
+
d
.
getHours
()
+
'时'
+
d
.
getMinutes
()
+
'分'
return
d
.
getMonth
()
+
1
+
'月'
+
d
.
getDate
()
+
'日'
+
d
.
getHours
()
+
'时'
+
d
.
getMinutes
()
+
'分'
}
}
}
}
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