Releases: dromara/carbon
Releases · dromara/carbon
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
v2.3.0
- Fix error in
DiffInMonths
method - Add
LoadTag
method, usecarbon
andtz
tags forMarshal
andUnmarshal
- Rename
ToANSICString
method toToAnsicString
- Set
nanoseconds
default to 0 inCreateFromDateTime
method - Set
hours
,minutes
andseconds
default to 0 inCreateFromDate
method #205 - Output different formats according to different tags in
String
method - Move
GormDataType
method fromjson.go
todatabase.go
⚠️ Remove the deprecatedFromStdTime
,Time2Carbon
,Carbon2Time
methods⚠️ RemoveDateTime
,DateTime
,DateTimeMilli
,DateTimeMicro
,DateTimeMicro
,DateTimeNano
,Date
,DateMilli
,DateMicro
,DateNano
,Timestamp
,TimestampMilli
,TimestampMicro
,TimestampNano
structs and related methods