Carbon is a lightweight, semantic, developer-friendly Golang time processing library that supports chained calls, lunar calendar, and mainstream ORMs such as GORM and XORM

If you think it is good, please give it a STAR

github:github.com/golang-module/carbon

gitee:gitee.com/go-package/carbon

Update log
  • Optimize the judgment logic of the IsZero() method
  • Fixed a bug where the microCond () method got the wrong number of milliseconds
  • Fixed a bug where the setMicrosecond () method set the wrong number of milliseconds
  • Fix the bug that the Lunar().festival () method is not Panic for any solar term
  • Fixed bug where Format() method could not parse as it was
  • Fixed a bug where the parseByFormat () method could not be resolved as it was
  • Using github.com/stretchr/testify/assert library instead of the original testing library
  • Increased unit test coverage scenarios to 96%
  • Unify the error format and modify part of the error copy
  • The Lunar() method implements the Stringer interface and outputs the Lunar year, month and day directly as a string, similar to Lunar().toString ().
  • Added createFromTimestamp () method to check if the timestamp is 0
  • New Lunar().toString () method to get the date of Lunar year, such as June 16, 2020
  • New support for JSON.unmarshalJSON ()