V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
The Go Programming Language
http://golang.org/
Go Playground
Go Projects
Revel Web Framework
gouguoyin

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

  •  
  •   gouguoyin ·
    kuafuRace · Sep 27, 2023 · 1232 views
    This topic created in 944 days ago, the information mentioned may be changed or developed.

    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"
    
    更新日志
    • isTestNow 方法更名为 hasTestNow
    • 修复使用 gorm 时自动更新时间字段类型错误的 bug
    • 新增 Time 结构体和 ToTimeStruct 方法
    • 新增 TimeMilli 结构体和 ToTimeMilliStruct 方法
    • 新增 TimeMicro 结构体和 ToTimeMicroStruct 方法
    • 新增 TimeNano 结构体和 ToTimeNanoStruct 方法
    1 replies    2023-09-28 09:53:46 +08:00
    kaz888
        1
    kaz888  
       Sep 28, 2023
    已 star ,看到支持 lunar year ,就觉得很棒。哈哈哈
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5988 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 02:16 · PVG 10:16 · LAX 19:16 · JFK 22:16
    ♥ Do have faith in what you're doing.