Releases: dromara/carbon
Releases · dromara/carbon
v2.5.2
What's Changed
- Fix
Time
,TimeMilli
,TimeMicro
,TimeNano
type fields cannot be parsed whenunmarshalJSON
- Remove deprecated method
ToStdTime
- Add
MaxValue
,MinValue
,IsValid
methods forGregorian
calendar - Add
MaxValue
,MinValue
,IsValid
methods forLunar
calendar - Add
MaxValue
,MinValue
,ToShortMonthString
,ToShortWeekString
methods forPersian
calendar - Add optional parameter
local
, optional valueen/fa
forPersian
calendarToMonthString
,ToWeekString
methods, default isen
Full Changelog: v2.5.1...v2.5.2
v2.5.1
What's Changed
- Add
MaxValue
,MinValue
methods - Add reference url
- Optimize
IsValid
method baseMinValue
,MinValue
Time
,TimeMilli
,TimeMicro
,TimeNano
structs set year, month, day whenUnmarshalJSON
- Fix minor grammar and notation corrections by @You-saku in #260
- Bump
github.com/stretchr/testify
from1.9.0
to1.10.0
by @dependabot in #261
Full Changelog: v2.5.0...v2.5.1
v2.5.0
What's Changed
- Change repository url from
github.com/golang-module/carbon
togithub.com/dromara/carbon
- Add
hungarian
translation #39 by @kenlas in #252 - Add support for
string
and[]byte
types when parsing database data inScan
method #251 - Retranslate
README.jp
by @You-saku in #259 - Fix
DiffInMonths()
method bug #255 - Fix
Japanese
translation by @nkmr-jp in #254 - Replace
Lock()
withRLock()
,Unlock()
withRUnlock()
to optimize performance by @ritbrz in #253 - Replace
ToDateTimeStruct()
withNewDateTime()
,ToDateTimeMilliStruct()
withNewDateTimeMilli()
,ToDateTimeMicroStruct()
withNewDateTimeMicro()
,ToDateTimeMilliNanoStruct()
withNewDateTimeNano()
- Replace
ToDateStruct()
withNewDate()
,ToDateMilliStruct()
withNewDateMilli()
,ToDateMicroStruct()
withNewDateMicro()
,ToDateNanoStruct()
withNewDateNano()
- Replace
ToTimeStruct()
withNewTime()
,ToTimeMilliStruct()
withNewTimeMilli()
,ToTimeMicroStruct()
withNewTimeMicro()
,ToTimeNano()Struct
withNewTimeNano()
DateTime
,DateTimeXXX
,Date
,DateXXX
,Time
,TimeXXX
structures implementScan
,Value
,MarshalJSON
,UnmarshalJSON
interfaces- Bump
codecov/codecov-action
from 4 to 5 by @dependabot in #256 - Unified use of global default timezone
defaultTimezone
whenUnmarshalJSON
New Contributors
- @kenlas made their first contribution in #252
- @nkmr-jp made their first contribution in #254
- @You-saku made their first contribution in #259
Full Changelog: v2.4.1...v2.5.0
v2.4.1
v2.4.0
- Fixed
Farsi
language translation bug #247 - Fixed
gregorian
calendar tolunar
calendar bug #246 - Updated the minimum version of Go required to
1.17
#245 - Optimized
ParseByLayout
andgetLocationByTimezone
methods when the timezone is empty - Optimized the scenario of JSON unmarsha when the value of the JSON string is empty or null
- Removed
Tag
struct and related methods - Added
Arabic
language support #250
v2.3.12
v2.3.11
- Add parsing support for
2006-01-02 15:04:05-0700 MST
format inParse
method - Return the original value instead of returning null when parsing the zero value time
0001-01-01 00:00:00
inParse
method #232 - Optimize the judgment logic in
IsValid
andIsInvalid
methods - Implement
Abs
method by itself inDiffAbsInDuration
method #226 - Unified unit test format
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