Skip to content

Releases: samsonjs/strftime

v0.10.3

12 Jun 00:06
8db2211
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.10.2...v0.10.3

Bug fixes

25 May 04:06
a0a62db
Compare
Choose a tag to compare
  • Fix test case for %c in current versions of node.js

  • Fix %-y so it omits the leading zero

Thanks to Aryan Arora for both fixes!

v0.10.1

12 Dec 18:49
Compare
Choose a tag to compare

What's Changed

  • fix it_IT shortMonths locale by @douglasep in #83

  • Fix readme (X: equivalent to %r in en_US) by @kawanet in #77

  • Try to get a short time zone name for %Z, falling back to the long one. This attempts to work around a change to Date.toString in v8 (node v10+, Chrome 66+). Unfortunately sometimes Date.toLocaleString returns a time zone like GMT+2 and we fall back to the long name in that case.

New Contributors

Full Changelog: v0.10.0...v0.10.1

v0.10.0

28 Dec 20:23
Compare
Choose a tag to compare
  • Remove the old API deprecated in v0.9.
  • Bundle some locales that you can use with strftime.localizeByIdentifier('nl_NL'). Full list available in the readme.
    Thanks to Andrew Pirondini of iFixit
  • Add instructions to install with Yarn.
    Thanks to Ayman Nedjmeddine
  • Unrecognized format specifiers preserve the % sign, e.g. strftime('%K') => "%K".
    Thanks to Kevin Jin
  • Make strftime work with dates that have been extended by DateJS.
    Thanks to Stian Grytøyr
  • Add instructions to install with Yarn.
    Thanks to Ayman Nedjmeddine
  • Fix UTC formatting of dates that cross a DST boundary.
    Thanks to ray007
  • Allow localizing ordinals.
    Thanks to Simon Liétar

v0.9.2

30 May 00:54
Compare
Choose a tag to compare
  • fix a caching bug, which was a regression in 0.9.0 (issue #63)
  • update license attribute in package.json as required by npm
    Thanks to Peter deHaan
  • construct GMT times used in tests in a more robust way
  • fix a bug calculating week numbers (issue #56)
    Thanks to Alexandr Nikitin
  • warn about possible misuse of %:: or %::: modifiers

v0.9.1

30 May 00:55
Compare
Choose a tag to compare
  • re-fix issue #38 which was lost in the v0.9 merge
  • add a changelog

v0.9.0

30 May 00:55
Compare
Choose a tag to compare

This release marks the final run up to v1.0, which should be released by March 2016.

The headline feature is a huge performance boost resulting from this contest. Alexandr Nikitin has essentially rewritten the code and the results speak for themselves.

Along with this the API has been unified and cleaned up. strftimeTZ, strftimeUTC, and localizedStrftime have all been deprecated in favour of the following functions: timezone(tz), utc(), and localize(locale). You use them like so:

    var strftime = require('strftime'); // not required in web browsers

    var strftimeIT = strftime.localize(anItalianLocale);
    var strftimePST = strftime.timezone('-0800');
    var strftimeUTC = strftime.utc();

    // You can combine them
    var strftimeIT_PST = strftimeIT.timezone('-0800');

    // And chain them all at once
    var strftimeIT_PST = strftime.localize(anItalianLocale).timezone('-0800');

The previous API is deprecated and will be removed for v1.0. The good news is that the previous API is supported by adapting the new API, so you get most of the performance benefits before you even update your code to use the new API.

The new API does not support passing in a custom timezone or locale on each call to strftime. This is a regression so if you really need this use case let us know and we'll figure something out.

Thanks to all contributors that have helped to improve this library over the past 4 years.

v0.8.4

30 May 00:55
Compare
Choose a tag to compare
  • fix conversion of dates to UTC
    Thanks to Alexandr Nikitin
  • extend %z with a colon separator in timezone offsets, "[+-]HH:MM"
    Thanks to Cory Heslip
  • ignore irrelevant files in bower.json

v0.8.3

30 May 00:55
Compare
Choose a tag to compare
  • first release for Bower, and only released for Bower

v0.8.2

30 May 00:56
Compare
Choose a tag to compare
  • fix %e which is supposed to be padded with a space