go-carbon v2.2.13 发布,轻量级、语义化、对开发者友好的 Golang 时间处理库

carbon 是一个轻量级、语义化、对开发者友好的 golang 时间处理库,支持链式调用。

目前已被 awesome-go 收录,如果您觉得不错,请给个 star 吧

github.com/golang-module/carbon

gitee.com/golang-module/carbon

安装使用

Golang 版本大于等于 1.16
// 使用 github 库
go get -u github.com/golang-module/carbon/v2

import "github.com/golang-module/carbon/v2"

// 使用 gitee 库
go get -u gitee.com/golang-module/carbon/v2

import "gitee.com/golang-module/carbon/v2"
Golang 版本小于 1.16
// 使用 github 库
go get -u github.com/golang-module/carbon

import "github.com/golang-module/carbon"

// 使用 gitee 库
go get -u gitee.com/golang-module/carbon

import  "gitee.com/golang-module/carbon"
更新日志
  • 修复 lang/fr.jsonlang/jp.json 文件翻译错误
  • 修复 IsZero 方法的 bug
  • 新增 IsDST 方法,判断是否是夏令时
  • 新增 Closest 方法,获取距离指定 Carbon 对象最近的 Carbon 对象
  • 新增 Farthest 方法,获取距离指定 Carbon 对象最远的 Carbon 对象
  • modifier.go 更名为 boundary.go, modifier_test.go 更名为 boundary_test.go
本作品采用《CC 协议》,转载必须注明作者和本文链接
讨论数量: 0
(= ̄ω ̄=)··· 暂无内容!

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!
文章
79
粉丝
16
喜欢
124
收藏
98
排名:677
访问:1.1 万
私信
所有博文
社区赞助商