Skip to content

v0.9.0

Compare
Choose a tag to compare
@samsonjs samsonjs released this 30 May 00:55
· 82 commits to main since this release

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.