Releases: dromara/carbon
Releases · dromara/carbon
v2.3.10
- Fixed bug when
json.Unmarshaler
decoded a json string containing null value - Add
ISO8601ZuluLayout
,ISO8601ZuluMilliLayout
,ISO8601ZuluMicroLayout
,ISO8601ZuluNanoLayout
constants - Add
FormattedDateLayout
,FormattedDayDateLayout
constants - Add
ISO8601ZuluFormat
,ISO8601ZuluMilliFormat
,ISO8601ZuluMicroFormat
,ISO8601ZuluNanoFormat
constants - Add
FormattedDateFormat
,FormattedDayDateFormat
constants - Add
ToIso8601ZuluString
,ToIso8601ZuluMilliString
,ToIso8601ZuluMicroString
,ToIso8601ZuluNanoString
methods - Add
ToFormattedDateString
,ToFormattedDayDateString
methods - Add
GoString
method - Support json strings containing null when using
json.Unmarshaler
#225 - Remove deprecated
ToFormatString
method, useFormat
method instead - Remove deprecated
ToLayoutString
method, useLayout
method instead
v2.3.9
v2.3.8
v2.3.7
v2.3.6
- Extract the calendar as an independent sub package
- Add
CreateFromLunar
method, create aCarbon
instance fromLunar
date and time - Fix concurrent map read and map write in
ToMonthString
,ToShortMonthString
,ToWeekString
,ToShortWeekString
,Season
,Constellation
methods #180 - Improve
unit
andbenchmark
test coverage
v2.3.5
v2.3.4
v2.3.3
v2.3.2
- Add optional
timezone
parameter inCreateFromStdTime
method - Add
tag
embedded struct inCarbon
struct - Add
India
constant in timezone constants - Optimize
LoadTag
andparseTag
method - Set to
Local
timezone by default in database functionfunc (c *Carbon) Scan(v interface{})
- Improve benchmark testing coverage
v2.3.1
- Fix
testNow
is 0 when setting test now inNow
method - Add benchmark test files
xxx_bench_test.go
- Add format constants, such as
DateTimeFormat
,DateFormat
,TimeFormat
,AtomFormat
,ANSICFormat
... - Add support
carbon
tag of structcarbon
type field fordatetime
,date
,time
,iso8601
and other strings inLoadTag
method - Add support
tz
tag of structcarbon
type field inloadTag
function, use to set timezone #207 - Add support for
U
,V
,X
,Z
formatting symbols inParseByLayout
method #206 - Add support for
v
,u
,x
formatting symbols inToFormatString
orFormat
method - Rename
ClearTestNow
method toUnSetTestNow
- Rename
HasTestNow
method toIsSetTestNow
- Rename
xxx_test.go
file toxxx_unit_test.go
- Rename
json.go
file toencoding.go
,json_test.go
file toencoding_unit_test.go
- Move
Closest
andFarthest
methods fromtraveler.go
toextremum.go
,traveler_test.go
toextremum_unit_test.go
⚠️ Change receiver type fromstruct
topointer
inSetTestNow
method