Carbon is a lightweight, semantic, and developer-friendly Golang time processing library that supports chain-call, lunar, and major ORMs such as GORM and XORm

If you feel good, please give a star

github:github.com/golang-module/carbon

gitee:gitee.com/go-package/carbon

Update log
  • Fixed a bug where CreateFromDate() and CreateFromTime() methods lacked time zones
  • Remove the ToUtcString() method and replace it with ToString(carbon-.utc)
  • Added Format() to parse C and Q to get the current century and season
  • New IsInvalid() method to check whether it IsInvalid
  • Add the Location() method to get the Location, such asPRC
  • Add the Offset() method to obtain the Offset from the UTC time zone, for example28800
  • The new Layout() method outputs a string for the specified Layout, such as carbon.layout (” January 02, 2006 “).
  • Added the ToIso8601String() method to obtain the ISO8601 format string, such as2020-08-05T13:14:15+08:00
  • Optimized the Now(), Yesterday(), and Tomorrow() methods by adding an optional timezone parameter
  • Optimized the CreaterFromXXX() series of methods by adding an optional parameter timezone
  • Optimized the ToXXXString() method series, adding an optional parameter timezone
  • Optimize the CreateFromTimestamp() method to support negative timestamp
  • Optimized unit test coverage scenarios to increase unit test coverage to 99%
  • Separate the errors to the errors.go file and modify some of the error copy