Golang時間處理庫go-carbon?v2.2.13發(fā)布細(xì)則
更新時間:2023年11月08日 14:40:27 作者:Peleus
這篇文章主要為大家介紹了Golang?時間處理庫go-carbon?v2.2.13發(fā)布細(xì)則,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步,早日升職加薪
carbon
carbon 是一個輕量級、語義化、對開發(fā)者友好的 golang 時間處理庫,支持鏈?zhǔn)秸{(diào)用。
目前已被 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"
更新日志
- 修復(fù)
lang/fr.json和lang/jp.json文件翻譯錯誤 - 修復(fù)
IsZero方法的 bug - 新增
IsDST方法,判斷是否是夏令時 - 新增
Closest方法,獲取距離指定 Carbon 對象最近的 Carbon 對象 - 新增
Farthest方法,獲取距離指定 Carbon 對象最遠(yuǎn)的 Carbon 對象 - 將
modifier.go更名為boundary.go,modifier_test.go更名為boundary_test.go
以上就是Golang 時間處理庫go-carbon v2.2.13發(fā)布細(xì)則的詳細(xì)內(nèi)容,更多關(guān)于go carbon時間處理庫的資料請關(guān)注腳本之家其它相關(guān)文章!
相關(guān)文章
golang gopm get -g -v 無法獲取第三方庫的解決方案
這篇文章主要介紹了golang gopm get -g -v 無法獲取第三方庫的解決方案,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧2021-05-05
Go語言中切片(slice)和數(shù)組(array)的區(qū)別詳解
Go語言中切片(slice)和數(shù)組(array)是兩種不同的數(shù)據(jù)結(jié)構(gòu),它們在用法和行為上有一些重要區(qū)別,所以本文就通過一些代碼示例給大家詳細(xì)的介紹一下Go語言中切片(slice)和數(shù)組(array)的區(qū)別,需要的朋友可以參考下2023-09-09

