1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-04 12:52:28 +08:00

doc: add go playground demo

This commit is contained in:
dudaodong
2023-08-01 11:01:57 +08:00
parent 72924d4486
commit bb563724c7
9 changed files with 131 additions and 42 deletions

View File

@@ -298,7 +298,7 @@ func IsWeekend(t time.Time) bool {
}
// NowDateOrTime return current datetime with specific format and timezone.
// Play: todo
// Play: https://go.dev/play/p/EZ-begEjtT0
func NowDateOrTime(format string, timezone ...string) string {
tf, ok := timeFormat[strings.ToLower(format)]
if !ok {
@@ -318,7 +318,7 @@ func NowDateOrTime(format string, timezone ...string) string {
}
// Timestamp return current second timestamp.
// Play: todo
// Play: https://go.dev/play/p/iU5b7Vvjx6x
func Timestamp(timezone ...string) int64 {
t := time.Now()
@@ -335,7 +335,7 @@ func Timestamp(timezone ...string) int64 {
}
// TimestampMilli return current mill second timestamp.
// Play: todo
// Play: https://go.dev/play/p/4gvEusOTu1T
func TimestampMilli(timezone ...string) int64 {
t := time.Now()
@@ -351,7 +351,7 @@ func TimestampMilli(timezone ...string) int64 {
}
// TimestampMicro return current micro second timestamp.
// Play: todo
// Play: https://go.dev/play/p/2maANglKHQE
func TimestampMicro(timezone ...string) int64 {
t := time.Now()
@@ -367,7 +367,7 @@ func TimestampMicro(timezone ...string) int64 {
}
// TimestampNano return current nano second timestamp.
// Play: todo
// Play: https://go.dev/play/p/A9Oq_COrcCF
func TimestampNano(timezone ...string) int64 {
t := time.Now()