SwiftDate 4.1.0
SwiftDate 4.1.0
- Release Date: 2017/03/31
- Zipped Version: Download 4.1.0
New Features
-
#402 Added Greek localization (thanks to @dimmdesign)
-
#399
colloquialSinceNowalso allows to setunitsStyleparams to specify the type of values you want to print. -
#400
DateInRegionhas a class func nameddate(formats:fromRegion)which allows parsing a single string with multiple formats (the first one that succeeds returns the instance of theDateInRegion). Also available asStringextension (with the same name). -
#223
ISO8601DateTimeFormatternow recognize the timezone of an ISO string and create a date with the correct value. -
#407 SwiftDate now can parse ISO8601 strings without specifyng the ISO format; it evaluates the best format automatically. Also the parser faster than the previous built one. Since now
.iso8601parsing format is used only as formatter (from date to string, viceversa any given value is ignored. You are encouraged to use.iso8601Autoinstead).The following ISO8601 variants are supported:
YYYYMMDD
YYYY-MM-DD
YYYY-MM
YYYY
YY //century
//Implied century: YY is 00-99
YYMMDD
YY-MM-DD
-YYMM
-YY-MM
-YY
//Implied year
--MMDD
--MM-DD
--MM
//Implied year and month
---DD
//Ordinal dates: DDD is the number of the day in the year (1-366)
YYYYDDD
YYYY-DDD
YYDDD
YY-DDD
-DDD
//Week-based dates: ww is the number of the week, and d is the number (1-7) of the day in the week
yyyyWwwd
yyyy-Www-d
yyyyWww
yyyy-Www
yyWwwd
yy-Www-d
yyWww
yy-Www
//Year of the implied decade
-yWwwd
-y-Www-d
-yWww
-y-Www
//Week and day of implied year
-Wwwd
-Www-d
//Week only of implied year
-Www
//Day only of implied week
-W-d
Fixes
- #405 Fixed some translation issues in Swedish (thanks to @deville)
- #368 Deprecated
at(unitsWithValues dict: [Calendar.Component : Int])inDateandDateInRegionand replaced with functionalat(values: [Calendar.Component : Int], keep: Set<Calendar.Component>) - #392 Fixed an issue with report negative interval when making operation with dates
aandbwherea - b < 0 iff a < b. - #397 Fixed an issue with
colloquialfunc which report wrong difference of1 daywhen two dates are distant < 24h but in two different days.