You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Go to file
dtapps e25da0cbd4
- 增加 `ZhFormat`
4 weeks ago
.drone.yml - update 2 years ago
.gitignore - 增加 `ToDateFormatTime` 方法 2 months ago
LICENSE - update 2 years ago
README.md - 增加 `ZhFormat` 4 weeks ago
compare.go 增加方法: 2 years ago
differ.go init 2 years ago
errors.go init 2 years ago
format.go - 增加 `ZhFormat` 4 weeks ago
format_test.go - 增加 `ZhFormat` 4 weeks ago
go.mod - 增加 `ZhFormat` 4 weeks ago
gotime.go - 增加 `ZhFormat` 4 weeks ago
gotime_test.go - 增加 `ToDateFormatTime` 方法 2 months ago
location.go init 2 years ago
mongo.go add bson 2 years ago
start_end.go init 2 years ago
today.go - 增加 `ToDateFormatTime` 方法 2 months ago
tomorrow.go - update 2 years ago
verification.go - 增加[验证字符串是否为时间]方法 2 years ago
verification_test.go - 增加[验证字符串是否为时间]方法 2 years ago
version.go - 增加 `ZhFormat` 4 weeks ago
version_test.go - 增加[验证字符串是否为时间]方法 2 years ago
yesterday.go init 2 years ago

README.md

Golang

📦 Golang 时间

godoc goproxy.cn goreportcard.com deps.dev

安装

go get -v -u go.dtapp.net/gotime@v1.0.8

使用

package main

import (
	"go.dtapp.net/gotime"
	"testing"
)

// TestVerification 验证字符串是否为时间
func TestVerification(t *testing.T) {
	t.Log(gotime.Verification("2022-02-05 00:00:00", gotime.DateTimeFormat))
}