Skip to content

SwiftDate 4.1.1

Compare
Choose a tag to compare
@malcommac malcommac released this 06 Apr 18:21
· 588 commits to master since this release

New Features

  • #408 Date and DateInRegion has now two functions to round a date to certain interval (expressed in seconds or minutes). DateInRegion exposes roundAt()聽which directly modify the date itself; Date, as immutable object, exposes the same feature in roundedAt() function (which return a new Date instances).
  • #414 Added Daylight Saving Time functions: .isDST in DateInRegion (it returns true if the date uses daylight saving time); .DSTOffset in DateInRegion (it returns the value (in seconds) of the daylight saving time offset of the represented date), . nextDSTTransitionDate in DateInRegion (it returns the next daylight saving time transition after currently represented date when expressed); nextDSTTransitionDate() func in Date聽(it returns the next dst transition date when receiver is expressed in a particular timezone); DSTOffset() func in Date聽(it returns the offset of daylight saving time when receiver is expressed in a particular timezone); isDST() func in Date聽(it returns if receiver date uses daylight saving time when expressed in a particular timezone).

Fixes

  • #410 Several fixes while parsing less common ISO8601 formats (weeks only w/wo implicit year/month/day).
  • #411 Parsing an ISO8601 string now results in a DateInRegion which contains the correct timezone defined (Date instances are now converted automatically to be time-independent).
  • #412 Updated Unit Tests to become compatible with the new APIs changes. All tests now passes.
  • #409 Fixed an issue converting a difference between two dates when its more than 24 hours, but less than 48 hours (incorrectly the colloquial values returns 'yesterday')
  • #413 Single framework target in XCode Project (iOS, macOS, tvOS and watchOS)