Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
rym-util
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhengqiuyun
rym-util
Commits
84ed9c2b
Commit
84ed9c2b
authored
Nov 28, 2022
by
zhengqiuyun86
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
时间帮助类新增ParseDateTimeE
parent
0b0d5b22
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
DateUtil.go
util/DateUtil.go
+5
-0
No files found.
util/DateUtil.go
View file @
84ed9c2b
...
...
@@ -41,6 +41,11 @@ func ParseDateTime(dateTime string) time.Time {
return
stamp
}
func
ParseDateTimeE
(
dateTime
string
)
(
time
.
Time
,
error
)
{
stamp
,
err
:=
time
.
ParseInLocation
(
formatSimple1
,
dateTime
,
time
.
Local
)
return
stamp
,
err
}
func
AddDate
(
date
time
.
Time
,
d
int
)
time
.
Time
{
t
:=
(
int64
)(
d
*
24
*
60
*
60
)
return
Add
(
date
,
t
)
...
...
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