Releases: dromara/carbon
Releases · dromara/carbon
v2.3.2
- Add optional
timezoneparameter inCreateFromStdTimemethod - Add
tagembedded struct inCarbonstruct - Add
Indiaconstant in timezone constants - Optimize
LoadTagandparseTagmethod - Set to
Localtimezone by default in database functionfunc (c *Carbon) Scan(v interface{}) - Improve benchmark testing coverage
v2.3.1
- Fix
testNowis 0 when setting test now inNowmethod - Add benchmark test files
xxx_bench_test.go - Add format constants, such as
DateTimeFormat,DateFormat,TimeFormat,AtomFormat,ANSICFormat... - Add support
carbontag of structcarbontype field fordatetime,date,time,iso8601and other strings inLoadTagmethod - Add support
tztag of structcarbontype field inloadTagfunction, use to set timezone #207 - Add support for
U,V,X,Zformatting symbols inParseByLayoutmethod #206 - Add support for
v,u,xformatting symbols inToFormatStringorFormatmethod - Rename
ClearTestNowmethod toUnSetTestNow - Rename
HasTestNowmethod toIsSetTestNow - Rename
xxx_test.gofile toxxx_unit_test.go - Rename
json.gofile toencoding.go,json_test.gofile toencoding_unit_test.go - Move
ClosestandFarthestmethods fromtraveler.gotoextremum.go,traveler_test.gotoextremum_unit_test.go ⚠️ Change receiver type fromstructtopointerinSetTestNowmethod
v2.3.0
- Fix error in
DiffInMonthsmethod - Add
LoadTagmethod, usecarbonandtztags forMarshalandUnmarshal - Rename
ToANSICStringmethod toToAnsicString - Set
nanosecondsdefault to 0 inCreateFromDateTimemethod - Set
hours,minutesandsecondsdefault to 0 inCreateFromDatemethod #205 - Output different formats according to different tags in
Stringmethod - Move
GormDataTypemethod fromjson.gotodatabase.go ⚠️ Remove the deprecatedFromStdTime,Time2Carbon,Carbon2Timemethods⚠️ RemoveDateTime,DateTime,DateTimeMilli,DateTimeMicro,DateTimeMicro,DateTimeNano,Date,DateMilli,DateMicro,DateNano,Timestamp,TimestampMilli,TimestampMicro,TimestampNanostructs and related methods
v2.2.14
v2.2.13
v2.2.12
v2.2.11
v2.2.10
v2.2.9
v2.2.8
- Rename
isTestNowmethod tohasTestNow - Fixe the wrong type of automatically update time when using
gorm#182 - Add
Timestruct andToTimeStructmethod - Add
TimeMillistruct andToTimeMilliStructmethod - Add
TimeMicrostruct andToTimeMicroStructmethod - Add
TimeNanostruct andToTimeNanoStructmethod