Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
utils
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
golang kittool
utils
Commits
e6d101a2
Commit
e6d101a2
authored
Mar 30, 2022
by
feidy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update time utils
parent
999d400f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
times.go
times.go
+4
-4
No files found.
times.go
View file @
e6d101a2
...
...
@@ -26,9 +26,9 @@ func Today() time.Time {
return
time
.
Date
(
t
.
Year
(),
t
.
Month
(),
t
.
Day
(),
0
,
0
,
0
,
0
,
t
.
Location
())
}
func
Yesterday
()
time
.
Time
{
func
Yesterday
()
time
.
Time
{
t
:=
time
.
Now
()
return
time
.
Date
(
t
.
Year
(),
t
.
Month
(),
t
.
Day
()
-
1
,
0
,
0
,
0
,
0
,
t
.
Location
())
return
time
.
Date
(
t
.
Year
(),
t
.
Month
(),
t
.
Day
()
-
1
,
0
,
0
,
0
,
0
,
t
.
Location
())
}
// ToDay 2019-08-21 22:07:07 -> 2019-08-21 00:00:00
...
...
@@ -109,10 +109,10 @@ func FormatRFC3339(t time.Time) string {
return
t
.
Format
(
RFC3339
)
}
func
YesterdayStart
()
int64
{
func
YesterdayStart
()
int64
{
return
TimeToTimestamp
(
Yesterday
())
}
func
YesterdayEnd
()
int64
{
func
YesterdayEnd
()
int64
{
return
TimeToTimestamp
(
Today
())
-
1000
}
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