We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pkg version: github.com/golang-module/carbon/v2 v2.2.14
github.com/golang-module/carbon/v2 v2.2.14
目前似乎无法直接比较获取 time.Duration ,只能解析标准库获取??
time.Duration
示例代码
func main() { now := carbon.Now() tomorrow := carbon.Tomorrow() duration := tomorrow.ToStdTime().Sub(now.ToStdTime()) fmt.Println(duration) }
The text was updated successfully, but these errors were encountered:
Upgrade to v2.3.9, using DiffInDuration or DiffAbsInDuration method, such as
DiffInDuration
DiffAbsInDuration
now := carbon.Now() now.DiffInDuration(now).String() // 0s now.AddHour().DiffInDuration(now).String() // 1h0m0s now.SubHour().DiffInDuration(now).String() // -1h0m0s
Sorry, something went wrong.
gouguoyin
No branches or pull requests
pkg version:
github.com/golang-module/carbon/v2 v2.2.14
目前似乎无法直接比较获取
time.Duration
,只能解析标准库获取??示例代码
The text was updated successfully, but these errors were encountered: