Skip to content

Commit

Permalink
v5.0.1: Backward compatibility fix: make year/month/day/... parameter…
Browse files Browse the repository at this point in the history
…s optional in TimeZone#abbreviationForUtc(), TimeZone#offsetForZone() and TimeZone#offsetForUtc()
  • Loading branch information
Rogier Schouten committed Oct 17, 2016
1 parent 524e0eb commit b607f1d
Show file tree
Hide file tree
Showing 5 changed files with 96 additions and 15 deletions.
6 changes: 3 additions & 3 deletions dist/timezonecomplete.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/timezonecomplete.min.js

Large diffs are not rendered by default.

83 changes: 82 additions & 1 deletion doc/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,52 @@

# Changelog

## 5.0.0 (2016-10-15)
## 5.0.1 (2016-10-17)

* Backward compatibility fix: make year/month/day/... parameters optional in TimeZone#abbreviationForUtc(), TimeZone#offsetForZone() and TimeZone#offsetForUtc()

## 5.0.0 (2016-10-16)

* Separate the tz data into a separate set of NPM modules, allowing to install only the time zones needed.

See [UPGRADING.md](./UPGRADING.md) for instructions on how to migrate from earlier versions.

### 4.0.1 (2016-10-16)

* Fix for stand-alone use of timezonecomplete browser bundles
* Add stand-alone use example

### 4.0.0 (2016-10-15)

* Performance improvements, with a few minor breaking changes as a result

### 3.0.6 (2016-09-29)

* Upgrade TZ database to 2016g
* Upgrade dev-dependencies to latest versions

### 3.0.5 (2016-07-07)

* Upgrade TZ database to 2016f

### 3.0.4 (2016-06-15)

* Upgrade TZ database to 2016e

### 3.0.3 (2016-04-18)

* Upgrade TZ database to 2016d

### 3.0.2 (2016-03-24)

* Upgrade TZ database to 2016c

### 3.0.1 (2016-03-15)

* Upgrade TZ database to 2016b

### 3.0.0 (2016-03-14)

A small Period overhaul:
* Add Period#findLast() analogous to Period#findFirst().
* Periods are now symmetric around the start date, i.e. the start date is no longer considered the point only after which the periods run. So now, calling e.g. findPrev() on the start date returns one period before the start date rather than null.
Expand All @@ -42,108 +56,139 @@ A small Period overhaul:
* The Period#equals() method now considers periods equal also if their reference dates (start dates) are not equal but are boundary dates of each other.

### 2.0.6 (2016-02-27)

* Remove dependency on Node.JS modules for better browser support.

### 2.0.5 (2016-02-26)

* fix for Travis CI build

### 2.0.4 (2016-02-26)

* fix for package.json typings field

### 2.0.1-2.0.3 (2016-02-25)

* adjust .npmignore to avoid publishing stuff that doesn't need publishing
* Improve README.md

### 2.0.0 (2016-02-25)

* Browser bundle with UMD wrapper and minified version
* For TypeScript users: uses ES6-style imports
* For TypeScript users: uses 'typings' field in package.json, so you can/must drop your reference to timezonecomplete.d.ts and ensure that you use 'node' module resolution for tsc.
* Added karma tests to ensure timezonecomplete works well across different browsers

### 1.27.2 (2016-02-02)

* Bugfix for zones that have observed DST but no longer do e.g. Asia/Tokyo zone (issue #22)

### 1.27.1 (2016-01-29)

* Upgrade timezone database to 2016a

### 1.27.0 (2016-01-20)

* Add validation function tc.parseable() for date/time strings

### 1.26.0 (2016-01-20)

* Add possibility to change month, weekday, quarter names

### 1.25.1 (2016-01-13)

* Improved documentation for DateTime.add()/sub()/addLocal()/subLocal()
* Removed console.log() statement
* Bugfix: DateTime#format() would throw if a zone was specified in the format string but no zone was present
* DateTime#format() now trims the string before returning it.

### 1.25.0 (2015-12-03)

* Removed private DateTime member _unixUtcMillisCache to facilitate simple comparison of date objects by their members. There is now a global cache of unix milliseconds.

### 1.24.1 (2015-11-27)

* Bugfix parsing times with zeroes.

### 1.24.0 (2015-11-05)

* Add new DateTime constructor that accepts a date string and a format string to parse dates in a given format
* Add new static method DateTime.parse() that does the same.

### 1.23.0 (2015-10-02)

* Add a static method DateTime.exists() to see whether a given date exists in its time zone

### 1.22.2 (2015-10-02)

* Upgrade TZ database to 2015g

### 1.22.1 (2015-09-21)

* Bugfix: dev-dependencies were listed as dependencies

### 1.22.0 (2015-09-16)

* Add a method to TzDatabase to get a list of all zone names

### 1.21.1 (2015-08-12)

* Upgrade TZ database to 2015f

### 1.21.0 (2015-07-21)

* Add a method to TzDatabase to get the next DST transition moment after a given date

### 1.20.0 (2015-07-20)

* Make a TzDatabase class available with general info on all time zones

### 1.19.4 (2015-06-15)

* Upgrade TZ database to 2015e

### 1.19.3 (2015-04-28)

* Upgrade TZ database to 2015d

### 1.19.2 (2015-04-14)

* Upgrade TZ database to 2015c

### 1.19.1 (2015-04-09)

* Minor adjustment to tc.utc() so that tc.utc().identical(tc.zone("UTC")) === true (they had a different DST flag)

### 1.19.0 (2015-04-02)

* Made Period cloneable by adding a clone() method

### 1.18.0 (2015-04-01)

* Add DateTime#startOfMonth() which returns the date truncated to the first day of the month at 00:00:00
* Add DateTime#startOfYear() which returns the date truncated to the first day of the year at 00:00:00
* Add Period#findPrev() analogous to findNext()
* Allow count parameter <= 0 in Period#findNext() / Period#findPrev() i.e. findNext(dt, -1) === findPrev(dt, 1)

### 1.17.0 (2015-03-30)

* Add DateTime#toExcel() and DateTime#toUtcExcel() functions to convert a DateTime to a Microsoft Excel date/time number.

### 1.16.1 (2015-03-26)

* Make DateTime constructor robust with respect to fractional numbers (it rounds to nearest millisecond)
* Make DateTime#add() / addLocal() / sub() / subLocal() robust to fractional amounts (works for millis through weeks, throws for months/years)

### 1.16.0 (2015-03-26)

* Add DateTime#withZone() method to add/replace the time zone of an existing datetime

### 1.15.1 (2015-03-23)

* Upgrade TZ database to 2015b

### 1.15.0

* Add TimeUnit.Millisecond enum value and make it work everywhere
* Duration class now remembers its unit and it can be used to store Days/Months/Years precisely now too
* Add members Duration.amount(), Duration.unit() to get at stored value
Expand All @@ -159,39 +204,49 @@ A small Period overhaul:
* BREAKING CHANGE: for approximate calculations, a year is now seen as 360 days iso 365 (because a month was already seen as 30 days)

### 1.14.0 (2015-03-12)

* Add Duration.abs() function and global abs() function

### 1.13.2 (2015-03-11)

* Allow "without DST" suffix in time zone name.

### 1.13.1 (2015-03-10)

* Check time zone name in TimeZone constructor.

### 1.13.0

* Add static DateTime.fromExcel() function to convert a Microsoft Excel / ODF timestamp number to a datetime
https://stackoverflow.com/questions/981655/how-to-represent-a-datetime-in-excel
https://en.wikipedia.org/wiki/Leap_year_bug

### 1.12.1

* Upgrade TZ database to 2015a

### 1.12.0 (2015-01-16)

* Add Period#equals() which checks whether two periods have the same net effect.
* Add Period#identical() which checks whether two periods were constructed in the same way.
* Add TimeZone#identical() which checks whether two time zones were constructed the same way.
* Adjust DateTime#identical() to no longer allow equal-but-not-identical time zone.
* Made last Period constructor argument optional (default: regular local time)

### 1.11.2 (2015-01-09)

* Remove dependency on source-map-support outside of tests.

### 1.11.1 (2015-01-08)

* Bugfix in DateTime#sub() and DateTime#add()

### 1.11.0 (2014-12-09)

* Add function startOfDay() to truncate a DateTime down to a date (00:00:00.000 on the same day).

### 1.10.0 (2014-11-25)

* Added global functions for most static functions (the old ones will remain):
* tc.now() for tc.DateTime.now()
* tc.nowLocal() for tc.DateTime.nowLocal()
Expand Down Expand Up @@ -223,51 +278,64 @@ var dt = new DateTime(2014, 1, 1, 23, 59, 59, 999, tc.zone("Europe/Amsterdam", f
```

### 1.9.1 (2014-11-11)

* Upgrade time zone database to 2014j

### 1.9.0 (2014-10-29)

* Add function timeUnitToMilliseconds()
* Add Duration constructor for an amount of time units.
* Documented missing Duration constructors.

### 1.8.3 (2014-10-24)

* Bugfix in unixUtxMillis() for dates created with the DateTime(number) constructor.

### 1.8.2 (2014-10-24)

* Document that < and > work out of the box on Duration / DateTime.
* Fix in README.md for DateTime.format()
* Performance optimization for DateTime.valueOf() and DateTime.unixUtcMillis() and < and > on DateTimes.

### 1.8.1 (2014-10-22)

* Upgrade time zone database to 2014i

### 1.8.0 (2014-10-17)

* Add global min() and max() functions for DateTime and Duration
* Add DateTime.min() and DateTime.max() function

### 1.7.0 (2014-10-06)

* Add Duration.greaterEqual() and Duration.lessEqual()
* Bugfix in DateTime-from-string constructor: leading/trailing whitespace led to date not getting parsed.
* Bugfix in Duration-from-string constructor: leading/trailing whitespace led to duration not getting parsed.

### 1.6.0 (2014-10-02)

* Add Period.isBoundary() method for checking that a date is on a period boundary.

### 1.5.4 (2014-09-29)

* Upgrade time zone database to 2014h
* README.md typos

### 1.5.3 (2014-09-09)

* Upgrade time zone database to 2014g

### 1.5.2 (2014-08-27)

* Upgrade time zone database to 2014f
* Upgrade typedoc documentation generator to 0.1.1

### 1.5.1 (2014-08-20)

* Typo in function name: secondPfDay() -> secondOfDay()

### 1.5.0 (2014-08-20)

* Add format() function to DateTime to convert a DateTime to a string with a specified format.
* Add valueOf() method to DateTime and Duration
* Add dayOfYear() and utcDayOfYear() to DateTime returning the n-th day of the year, starting at 0
Expand All @@ -281,30 +349,36 @@ var dt = new DateTime(2014, 1, 1, 23, 59, 59, 999, tc.zone("Europe/Amsterdam", f
* Add zoneAbbreviation() to DateTime to get time zone abbreviation at the specified datetime.

### 1.4.6 (2014-08-15)

* Bugfix TypeScript .d.ts file

### 1.4.5 (2014-08-15)

* Removed Javascript Date class as much as possible because it behaves differently across platforms.
* Performance improvements (caching in TzDatabase class)
* Corrected HTML example in README.md now that timezone-js is gone
* Bugfix in unix timestamp -> datetime conversion for dates on jan 1st prior to 1970

### 1.4.4 (2014-08-14)

* TZ database version: 2014e
* Removed dependency on timezone-js
* Fixed inconsistent behaviour across different platforms.
* Fixed inconsistent behaviour with / without TZ environment variable setting.
* Fixed behaviour with non-existing local times.

### 1.4.3 (2014-07-31)

* Improved timezonecomplete behaviour when using browserify

### 1.4.2 (2014-07-28)

* Ensured tests run with different TZ environment variable settings
* Ensured build runs on Travis CI and the coverage is picked up by Coveralls.io
* Bugfix in weekDay() for times near 00:00:00 with certain machine time zones

### 1.4.1 (2014-07-24)

* Ensured all code is covered with tests using istanbul
* Bufgix in DateTime.toIsoString(): missing space
* Bufgix in DateTime.toIsoString(): local time zone not handled correctly
Expand All @@ -313,27 +387,34 @@ var dt = new DateTime(2014, 1, 1, 23, 59, 59, 999, tc.zone("Europe/Amsterdam", f
* Performance improvement for Period.findFirst() regarding Second periods.

### 1.4.0 (2014-07-24)

* Enable use of timezonecomplete in browser

### 1.3.1 (2014-07-09)

* Add inspect() methods so that console.log(myDateTime) works.
* Bugfix in DateTime.toString(): missing space for datetime in local time.

### 1.3.0 (2014-07-07)

* Add day-of-week methods to DateTime: weekDay() and utcWeekDay()
* Add .d.ts file for timezonecomplete inside the package as well as on DefinitelyTyped

### 1.2.0 (2014-06-30)

* Add Duration.divide() method

### 1.1.0 (2014-06-27)

* Update Time Zone Database to 2014-06-16
* Add Duration.add() and Duration.sub() methods

### 1.0.1 (2014-06-26)

* Bugfixes in package.json

### 1.0.0 (2014-06-26)

* First released version.

## Contributors
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "timezonecomplete",
"version": "5.0.0",
"version": "5.0.1",
"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",
Expand Down
Loading

0 comments on commit b607f1d

Please sign in to comment.