-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b79199f
commit 81a8cab
Showing
4 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,5 @@ use ( | |
./xslices | ||
./xslog | ||
./xstrconv | ||
./xtime | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# xtime | ||
Extensions to the standard Go library's `time` package. | ||
|
||
### Install | ||
``` | ||
go get github.com/kucherenkovova/gopypaste/[email protected] | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module github.com/kucherenkovova/gopypaste/xtime | ||
|
||
go 1.20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package xtime | ||
|
||
import ( | ||
"time" | ||
) | ||
|
||
const ( | ||
Nanosecond time.Duration = 1 | ||
Microsecond = 1000 * Nanosecond | ||
Millisecond = 1000 * Microsecond | ||
Second = 1000 * Millisecond | ||
Minute = 60 * Second | ||
Hour = 60 * Minute | ||
Day = 24 * Hour | ||
Week = 7 * Day | ||
) |