github bitwalker/timex 0.12.9
Version 0.13.0

latest releases: 3.7.9, 3.7.8, 3.7.6...
9 years ago

Changes

PLEASE READ

I've made some changes around timezone conversion to make the API more explicit, and open up some options previously unavailable for working with DateTime objects. Make note of the changes below and how they may affect you, if at all.

  • Timezone.convert now does the time shift AND sets the timezone. Previously it only shifted the time.
  • Date.set(date, timezone: tz) no longer does implicit timezone conversion. You must use Timezone.convert if you want to shift a date to another timezone.
  • Added Date.compare/3, which takes a granularity option for determining equality during a comparison. The options available are :years, :months, :weeks, :days, :hours, :mins, :secs, and :timestamp - in other words, the same options that Date.diff takes. This means that if you have two dates only off by a few hours, Date.compare(a, b, :days) will return 0, or equal.

Please let me know if you run into any issues with this release. Thanks!

Don't miss a new timex release

NewReleases is sending notifications on new releases.