Skip to content

Commit

Permalink
Version 1.15.1: upgrade TZ database to 2015b
Browse files Browse the repository at this point in the history
  • Loading branch information
Rogier Schouten committed Mar 23, 2015
1 parent 5ecf7af commit 0df9c38
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 13 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -609,10 +609,13 @@ Currently not. This is because most platforms don't, especially when converting

## Current TZ database version:

The version of the included IANA time zone database is 2015a.
The version of the included IANA time zone database is 2015b.

## Changelog

### 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
Expand Down
2 changes: 1 addition & 1 deletion dist/timezonecomplete.js

Large diffs are not rendered by default.

27 changes: 18 additions & 9 deletions doc/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -532,16 +532,16 @@ <h3 id="periods">Periods</h3>
<span class="hljs-comment">// Timezone with DST specified (Europe/Amsterdam)</span>
<span class="hljs-comment">// Last argument is "RegularLocalTime"</span>
<span class="hljs-comment">// Repeating daily period at 8:05 local Amsterdam time (moves with Daylight Saving Time so it is always at 8:05 locally)</span>
<span class="hljs-keyword">var</span> period = <span class="hljs-keyword">new</span> tc.Period(<span class="hljs-keyword">new</span> tc.DateTime(<span class="hljs-string">"2014-01-01T08:05:00 Europe/Amsterdam"</span>), <span class="hljs-number">1</span>, tc.TimeUnit.Day, tc.PeriodDst.RegularLocalTime);
<span class="hljs-keyword">var</span> period = <span class="hljs-keyword">new</span> tc.Period(<span class="hljs-keyword">new</span> tc.DateTime(<span class="hljs-string">"2014-01-01T08:05:00 Europe/Amsterdam"</span>), tc.days(<span class="hljs-number">1</span>), tc.PeriodDst.RegularLocalTime);

<span class="hljs-comment">// Timezone with DST specified (Europe/Amsterdam)</span>
<span class="hljs-comment">// Last argument is "RegularIntervals"</span>
<span class="hljs-comment">// Repeating daily period at 8:05 OR 9:05 local Amsterdam time (which is always 7:05 UTC)</span>
<span class="hljs-keyword">var</span> period = <span class="hljs-keyword">new</span> tc.Period(<span class="hljs-keyword">new</span> tc.DateTime(<span class="hljs-string">"2014-01-01T08:05:00 Europe/Amsterdam"</span>), <span class="hljs-number">1</span>, tc.TimeUnit.Day, tc.PeriodDst.RegularIntervals);
<span class="hljs-keyword">var</span> period = <span class="hljs-keyword">new</span> tc.Period(<span class="hljs-keyword">new</span> tc.DateTime(<span class="hljs-string">"2014-01-01T08:05:00 Europe/Amsterdam"</span>), tc.days(<span class="hljs-number">1</span>), tc.PeriodDst.RegularIntervals);

<span class="hljs-comment">// Timezone without DST specified (+01:00)</span>
<span class="hljs-comment">// Repeating daily period at 7:05 UTC</span>
<span class="hljs-keyword">var</span> period2 = <span class="hljs-keyword">new</span> tc.Period(<span class="hljs-keyword">new</span> tc.DateTime(<span class="hljs-string">"2014-01-01T08:05:00+01:00"</span>), <span class="hljs-number">1</span>, tc.TimeUnit.Day, tc.PeriodDst.RegularLocalTime);
<span class="hljs-keyword">var</span> period2 = <span class="hljs-keyword">new</span> tc.Period(<span class="hljs-keyword">new</span> tc.DateTime(<span class="hljs-string">"2014-01-01T08:05:00+01:00"</span>), tc.days(<span class="hljs-number">1</span>), tc.PeriodDst.RegularLocalTime);

<span class="hljs-comment">// You can calculate the first occurrence after a given date (in any time zone)</span>
<span class="hljs-comment">// "2014-05-01T08:05:00.000 Europe/Amsterdam"</span>
Expand All @@ -555,10 +555,15 @@ <h3 id="periods">Periods</h3>
period.isBoundary(occurrence); <span class="hljs-comment">// true</span>

<span class="hljs-comment">// Equality checking</span>
<span class="hljs-keyword">var</span> p = <span class="hljs-keyword">new</span> tc.Period(<span class="hljs-keyword">new</span> tc.DateTime(<span class="hljs-string">"2014-01-01T00:00:00"</span>), <span class="hljs-number">1</span>, tc.TimeUnit.Hour, tc.PeriodDst.RegularIntervals);
<span class="hljs-keyword">var</span> q = <span class="hljs-keyword">new</span> tc.Period(<span class="hljs-keyword">new</span> tc.DateTime(<span class="hljs-string">"2014-01-01T00:00:00"</span>), <span class="hljs-number">60</span>, tc.TimeUnit.Minutes, tc.PeriodDst.RegularIntervals);
<span class="hljs-keyword">var</span> p = <span class="hljs-keyword">new</span> tc.Period(<span class="hljs-keyword">new</span> tc.DateTime(<span class="hljs-string">"2014-01-01T00:00:00"</span>), tc.hours(<span class="hljs-number">1</span>), tc.PeriodDst.RegularIntervals);
<span class="hljs-keyword">var</span> q = <span class="hljs-keyword">new</span> tc.Period(<span class="hljs-keyword">new</span> tc.DateTime(<span class="hljs-string">"2014-01-01T00:00:00"</span>), tc.minutes(<span class="hljs-number">60</span>), tc.PeriodDst.RegularIntervals);
p.equals(q); <span class="hljs-comment">// true, same results</span>
p.identical(q); <span class="hljs-comment">// false, not same constructor arguments</span>

<span class="hljs-keyword">var</span> r = <span class="hljs-keyword">new</span> tc.Period(<span class="hljs-keyword">new</span> tc.DateTime(<span class="hljs-string">"2014-01-01T00:00:00"</span>), tc.days(<span class="hljs-number">30</span>), tc.PeriodDst.RegularIntervals);
<span class="hljs-keyword">var</span> s = <span class="hljs-keyword">new</span> tc.Period(<span class="hljs-keyword">new</span> tc.DateTime(<span class="hljs-string">"2014-01-01T00:00:00"</span>), tc.months(<span class="hljs-number">1</span>), tc.PeriodDst.RegularIntervals);
p.equals(q); <span class="hljs-comment">// false, not same results</span>
p.identical(q); <span class="hljs-comment">// false, not same constructor arguments</span>
</code></pre>
<h2 id="on-a-web-page">On a web page</h2>
<p>We spent some effort making timezonecomplete usable in the browser, by packaging it in a <a href="https://github.com/umdjs/umd">UMD</a>. This way, it can be used for example in plain html/javascript:</p>
Expand Down Expand Up @@ -606,8 +611,12 @@ <h3 id="why-does-the-number-returned-by-weeknumber-not-correspond-to-my-calendar
<h3 id="does-timezonecomplete-handle-leap-seconds-">Does timezonecomplete handle leap seconds?</h3>
<p>Currently not. This is because most platforms don&#39;t, especially when converting from and to unix timestamps. If we were to introduce leap seconds, you would have to keep very close track of which of your unix timestamps are adjusted for leap seconds and which aren&#39;t. We do plan to add support in some form though.</p>
<h2 id="current-tz-database-version-">Current TZ database version:</h2>
<p>The version of the included IANA time zone database is 2015a.</p>
<p>The version of the included IANA time zone database is 2015b.</p>
<h2 id="changelog">Changelog</h2>
<h3 id="1-15-1-2015-03-23-">1.15.1 (2015-03-23)</h3>
<ul>
<li>Upgrade TZ database to 2015b</li>
</ul>
<h3 id="1-15-0">1.15.0</h3>
<ul>
<li>Add TimeUnit.Millisecond enum value and make it work everywhere</li>
Expand Down Expand Up @@ -839,9 +848,9 @@ <h3 id="1-0-0-2014-06-26-">1.0.0 (2014-06-26)</h3>
</ul>
<h2 id="contributors">Contributors</h2>
<ul>
<li>Rogier Schouten <a href="&#109;&#97;&#x69;&#108;&#x74;&#x6f;&#x3a;&#114;&#46;&#115;&#99;&#104;&#x6f;&#117;&#116;&#101;&#x6e;&#x40;&#x73;&#x70;&#x69;&#114;&#x69;&#116;&#105;&#x74;&#46;&#99;&#x6f;&#x6d;">&#114;&#46;&#115;&#99;&#104;&#x6f;&#117;&#116;&#101;&#x6e;&#x40;&#x73;&#x70;&#x69;&#114;&#x69;&#116;&#105;&#x74;&#46;&#99;&#x6f;&#x6d;</a></li>
<li>Daan Wissing <a href="&#109;&#x61;&#105;&#x6c;&#x74;&#111;&#58;&#x64;&#46;&#119;&#x69;&#115;&#115;&#x69;&#x6e;&#103;&#x40;&#x73;&#x70;&#x69;&#114;&#105;&#x74;&#105;&#x74;&#x2e;&#99;&#x6f;&#x6d;">&#x64;&#46;&#119;&#x69;&#115;&#115;&#x69;&#x6e;&#103;&#x40;&#x73;&#x70;&#x69;&#114;&#105;&#x74;&#105;&#x74;&#x2e;&#99;&#x6f;&#x6d;</a></li>
<li>Peter Kooijmans <a href="&#x6d;&#97;&#x69;&#108;&#116;&#x6f;&#x3a;&#x70;&#x2e;&#107;&#x6f;&#x6f;&#105;&#106;&#109;&#x61;&#110;&#x73;&#x40;&#x73;&#x70;&#x69;&#114;&#105;&#116;&#x69;&#116;&#46;&#x63;&#x6f;&#109;">&#x70;&#x2e;&#107;&#x6f;&#x6f;&#105;&#106;&#109;&#x61;&#110;&#x73;&#x40;&#x73;&#x70;&#x69;&#114;&#105;&#116;&#x69;&#116;&#46;&#x63;&#x6f;&#109;</a></li>
<li>Rogier Schouten <a href="&#109;&#x61;&#105;&#x6c;&#x74;&#x6f;&#x3a;&#114;&#x2e;&#115;&#99;&#x68;&#x6f;&#x75;&#116;&#x65;&#110;&#x40;&#x73;&#x70;&#105;&#x72;&#x69;&#x74;&#x69;&#x74;&#x2e;&#x63;&#x6f;&#x6d;">&#114;&#x2e;&#115;&#99;&#x68;&#x6f;&#x75;&#116;&#x65;&#110;&#x40;&#x73;&#x70;&#105;&#x72;&#x69;&#x74;&#x69;&#x74;&#x2e;&#x63;&#x6f;&#x6d;</a></li>
<li>Daan Wissing <a href="&#109;&#97;&#x69;&#x6c;&#x74;&#x6f;&#58;&#x64;&#46;&#119;&#x69;&#115;&#115;&#x69;&#x6e;&#103;&#64;&#x73;&#112;&#x69;&#x72;&#x69;&#116;&#x69;&#116;&#46;&#x63;&#x6f;&#109;">&#x64;&#46;&#119;&#x69;&#115;&#115;&#x69;&#x6e;&#103;&#64;&#x73;&#112;&#x69;&#x72;&#x69;&#116;&#x69;&#116;&#46;&#x63;&#x6f;&#109;</a></li>
<li>Peter Kooijmans <a href="&#109;&#97;&#x69;&#108;&#116;&#111;&#x3a;&#x70;&#46;&#107;&#111;&#111;&#x69;&#x6a;&#x6d;&#x61;&#x6e;&#115;&#64;&#x73;&#x70;&#105;&#114;&#105;&#116;&#x69;&#116;&#x2e;&#x63;&#111;&#109;">&#x70;&#46;&#107;&#111;&#111;&#x69;&#x6a;&#x6d;&#x61;&#x6e;&#115;&#64;&#x73;&#x70;&#105;&#114;&#105;&#116;&#x69;&#116;&#x2e;&#x63;&#111;&#109;</a></li>
</ul>
<h2 id="license">License</h2>
<p>MIT</p>
Expand Down
2 changes: 1 addition & 1 deletion lib/timezone-data.json

Large diffs are not rendered by default.

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": "1.15.0",
"version": "1.15.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

0 comments on commit 0df9c38

Please sign in to comment.