V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
The Go Programming Language
http://golang.org/
Go Playground
Go Projects
Revel Web Framework
gouguoyin
V2EX  ›  Go 编程语言

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

  •  
  •   gouguoyin · 177 天前 · 726 次点击
    这是一个创建于 177 天前的主题,其中的信息可能已经有所发展或是发生改变。

    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"
    
    更新日志
    • 增加对荷兰语的支持
    • 测试文件里测试用例增加索引数字
    • 去掉 comparer.go 文件里 IsNow方法中的打印调试信息
    6 条回复    2023-11-02 13:35:58 +08:00
    ihipop
        1
    ihipop  
       177 天前
    从 PHP 用到 Golang , 熟悉而好用的 API 感谢。
    gouguoyin
        2
    gouguoyin  
    OP
       177 天前
    @ihipop 欢迎提出宝贵意见
    bthulu
        3
    bthulu  
       177 天前
    时间处理库不是官方自带的吗, 为什么还要造轮子
    fgwmlhdkkkw
        4
    fgwmlhdkkkw  
       177 天前 via Android
    carbon 不是个 Google 搞得新语言吗?🫵
    gouguoyin
        5
    gouguoyin  
    OP
       177 天前
    @bthulu 官方自带的标准库用起来不是很方便
    gouguoyin
        6
    gouguoyin  
    OP
       177 天前
    @fgwmlhdkkkw 在 carbon 语言没有之前就已经有 carbon 时间处理库了
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1481 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 16:57 · PVG 00:57 · LAX 09:57 · JFK 12:57
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.