From fae217952c0888ef29234530e67616fe96322a5d Mon Sep 17 00:00:00 2001 From: Rogier Schouten Date: Mon, 2 Jan 2017 17:55:48 +0100 Subject: [PATCH] v5.4.2 --- doc/API.md | 6 +++--- doc/CHANGELOG.md | 5 +++++ package.json | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/doc/API.md b/doc/API.md index 1a6300c..3e0ee3e 100644 --- a/doc/API.md +++ b/doc/API.md @@ -427,7 +427,7 @@ var africaDoualaDate = amsterdamDate.toZone("Africa/Douala"); var error = naiveDate.toZone("Europe/Amsterdam"); // ERROR! THROWS // Other way around is ok -var ok = amsterdamDate.toZone(null); // returns naive date +var ok = amsterdamDate.toZone(undefined); // returns naive date // In-place time zone conversion var d = new tc.DateTime("2014-01-01T13:59:59.000 Europe/Amsterdam"); @@ -460,8 +460,8 @@ tc.DateTime.exists(2015, 3, 29, 3, 0, 0, 0, TimeZone.zone("Europe/Amsterdam")); // Pre-1970 dates: you can allow or disallow them with the last boolean parameter // as the IANA time zone database is not reliable prior to 1970 -tc.DateTime.exists(1969, 12, 31, 23, 59, 59, 999, null, false); // false -tc.DateTime.exists(1969, 12, 31, 23, 59, 59, 999, null, true); // true +tc.DateTime.exists(1969, 12, 31, 23, 59, 59, 999, undefined, false); // false +tc.DateTime.exists(1969, 12, 31, 23, 59, 59, 999, undefined, true); // true tc.DateTime.exists(1969, 12, 31, 23, 59, 59, 999, TimeZone.zone("Europe/Amsterdam"), false); // false tc.DateTime.exists(1969, 12, 31, 23, 59, 59, 999, TimeZone.zone("Europe/Amsterdam"), true); // true diff --git a/doc/CHANGELOG.md b/doc/CHANGELOG.md index b5a070e..443686c 100644 --- a/doc/CHANGELOG.md +++ b/doc/CHANGELOG.md @@ -1,6 +1,11 @@ # Changelog +## 5.4.2 (2017-01-02) + +* Upgrade TypeScript to 2.1.4 and enable strict null checks and other compile-time checks +* DateTime.zone() now returns undefined rather than null for an unaware date + ## 5.4.1 (2016-11-14) * Bugfix in Duration#equalsExact(): identical durations of 1 day would not be seen as equal diff --git a/package.json b/package.json index 14a8ad1..80e4417 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "timezonecomplete", - "version": "5.4.1", + "version": "5.4.2", "description": "DateTime, TimeZone, Duration and Period library aimed at providing a consistent and complete date-time interface, away from the original JavaScript Date class.", "keywords": [ "Date",