UNPKG

moment-timezone

Version:

Timezone plugin for Moment.js.

572 lines (447 loc) 144 kB
var moment = require("../../index"); exports["America/Toronto"] = { "1918" : function (t) { t.equal(moment("1918-04-14T06:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1918-04-14T06:59:59+00:00 should be 01:59:59 EST"); t.equal(moment("1918-04-14T07:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "03:00:00", "1918-04-14T07:00:00+00:00 should be 03:00:00 EDT"); t.equal(moment("1918-10-27T05:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1918-10-27T05:59:59+00:00 should be 01:59:59 EDT"); t.equal(moment("1918-10-27T06:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:00:00", "1918-10-27T06:00:00+00:00 should be 01:00:00 EST"); t.equal(moment("1918-04-14T06:59:59+00:00").tz("America/Toronto").zone(), 300, "1918-04-14T06:59:59+00:00 should be 300 minutes offset in EST"); t.equal(moment("1918-04-14T07:00:00+00:00").tz("America/Toronto").zone(), 240, "1918-04-14T07:00:00+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1918-10-27T05:59:59+00:00").tz("America/Toronto").zone(), 240, "1918-10-27T05:59:59+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1918-10-27T06:00:00+00:00").tz("America/Toronto").zone(), 300, "1918-10-27T06:00:00+00:00 should be 300 minutes offset in EST"); t.done(); }, "1919" : function (t) { t.equal(moment("1919-03-31T04:29:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "23:29:59", "1919-03-31T04:29:59+00:00 should be 23:29:59 EST"); t.equal(moment("1919-03-31T04:30:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "00:30:00", "1919-03-31T04:30:00+00:00 should be 00:30:00 EDT"); t.equal(moment("1919-10-26T03:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "23:59:59", "1919-10-26T03:59:59+00:00 should be 23:59:59 EDT"); t.equal(moment("1919-10-26T04:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "23:00:00", "1919-10-26T04:00:00+00:00 should be 23:00:00 EST"); t.equal(moment("1919-03-31T04:29:59+00:00").tz("America/Toronto").zone(), 300, "1919-03-31T04:29:59+00:00 should be 300 minutes offset in EST"); t.equal(moment("1919-03-31T04:30:00+00:00").tz("America/Toronto").zone(), 240, "1919-03-31T04:30:00+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1919-10-26T03:59:59+00:00").tz("America/Toronto").zone(), 240, "1919-10-26T03:59:59+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1919-10-26T04:00:00+00:00").tz("America/Toronto").zone(), 300, "1919-10-26T04:00:00+00:00 should be 300 minutes offset in EST"); t.done(); }, "1920" : function (t) { t.equal(moment("1920-05-02T06:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1920-05-02T06:59:59+00:00 should be 01:59:59 EST"); t.equal(moment("1920-05-02T07:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "03:00:00", "1920-05-02T07:00:00+00:00 should be 03:00:00 EDT"); t.equal(moment("1920-09-26T03:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "23:59:59", "1920-09-26T03:59:59+00:00 should be 23:59:59 EDT"); t.equal(moment("1920-09-26T04:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "23:00:00", "1920-09-26T04:00:00+00:00 should be 23:00:00 EST"); t.equal(moment("1920-05-02T06:59:59+00:00").tz("America/Toronto").zone(), 300, "1920-05-02T06:59:59+00:00 should be 300 minutes offset in EST"); t.equal(moment("1920-05-02T07:00:00+00:00").tz("America/Toronto").zone(), 240, "1920-05-02T07:00:00+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1920-09-26T03:59:59+00:00").tz("America/Toronto").zone(), 240, "1920-09-26T03:59:59+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1920-09-26T04:00:00+00:00").tz("America/Toronto").zone(), 300, "1920-09-26T04:00:00+00:00 should be 300 minutes offset in EST"); t.done(); }, "1921" : function (t) { t.equal(moment("1921-05-15T06:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1921-05-15T06:59:59+00:00 should be 01:59:59 EST"); t.equal(moment("1921-05-15T07:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "03:00:00", "1921-05-15T07:00:00+00:00 should be 03:00:00 EDT"); t.equal(moment("1921-09-15T05:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1921-09-15T05:59:59+00:00 should be 01:59:59 EDT"); t.equal(moment("1921-09-15T06:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:00:00", "1921-09-15T06:00:00+00:00 should be 01:00:00 EST"); t.equal(moment("1921-05-15T06:59:59+00:00").tz("America/Toronto").zone(), 300, "1921-05-15T06:59:59+00:00 should be 300 minutes offset in EST"); t.equal(moment("1921-05-15T07:00:00+00:00").tz("America/Toronto").zone(), 240, "1921-05-15T07:00:00+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1921-09-15T05:59:59+00:00").tz("America/Toronto").zone(), 240, "1921-09-15T05:59:59+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1921-09-15T06:00:00+00:00").tz("America/Toronto").zone(), 300, "1921-09-15T06:00:00+00:00 should be 300 minutes offset in EST"); t.done(); }, "1922" : function (t) { t.equal(moment("1922-05-14T06:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1922-05-14T06:59:59+00:00 should be 01:59:59 EST"); t.equal(moment("1922-05-14T07:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "03:00:00", "1922-05-14T07:00:00+00:00 should be 03:00:00 EDT"); t.equal(moment("1922-09-17T05:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1922-09-17T05:59:59+00:00 should be 01:59:59 EDT"); t.equal(moment("1922-09-17T06:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:00:00", "1922-09-17T06:00:00+00:00 should be 01:00:00 EST"); t.equal(moment("1922-05-14T06:59:59+00:00").tz("America/Toronto").zone(), 300, "1922-05-14T06:59:59+00:00 should be 300 minutes offset in EST"); t.equal(moment("1922-05-14T07:00:00+00:00").tz("America/Toronto").zone(), 240, "1922-05-14T07:00:00+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1922-09-17T05:59:59+00:00").tz("America/Toronto").zone(), 240, "1922-09-17T05:59:59+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1922-09-17T06:00:00+00:00").tz("America/Toronto").zone(), 300, "1922-09-17T06:00:00+00:00 should be 300 minutes offset in EST"); t.done(); }, "1923" : function (t) { t.equal(moment("1923-05-13T06:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1923-05-13T06:59:59+00:00 should be 01:59:59 EST"); t.equal(moment("1923-05-13T07:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "03:00:00", "1923-05-13T07:00:00+00:00 should be 03:00:00 EDT"); t.equal(moment("1923-09-16T05:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1923-09-16T05:59:59+00:00 should be 01:59:59 EDT"); t.equal(moment("1923-09-16T06:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:00:00", "1923-09-16T06:00:00+00:00 should be 01:00:00 EST"); t.equal(moment("1923-05-13T06:59:59+00:00").tz("America/Toronto").zone(), 300, "1923-05-13T06:59:59+00:00 should be 300 minutes offset in EST"); t.equal(moment("1923-05-13T07:00:00+00:00").tz("America/Toronto").zone(), 240, "1923-05-13T07:00:00+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1923-09-16T05:59:59+00:00").tz("America/Toronto").zone(), 240, "1923-09-16T05:59:59+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1923-09-16T06:00:00+00:00").tz("America/Toronto").zone(), 300, "1923-09-16T06:00:00+00:00 should be 300 minutes offset in EST"); t.done(); }, "1924" : function (t) { t.equal(moment("1924-05-04T06:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1924-05-04T06:59:59+00:00 should be 01:59:59 EST"); t.equal(moment("1924-05-04T07:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "03:00:00", "1924-05-04T07:00:00+00:00 should be 03:00:00 EDT"); t.equal(moment("1924-09-21T05:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1924-09-21T05:59:59+00:00 should be 01:59:59 EDT"); t.equal(moment("1924-09-21T06:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:00:00", "1924-09-21T06:00:00+00:00 should be 01:00:00 EST"); t.equal(moment("1924-05-04T06:59:59+00:00").tz("America/Toronto").zone(), 300, "1924-05-04T06:59:59+00:00 should be 300 minutes offset in EST"); t.equal(moment("1924-05-04T07:00:00+00:00").tz("America/Toronto").zone(), 240, "1924-05-04T07:00:00+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1924-09-21T05:59:59+00:00").tz("America/Toronto").zone(), 240, "1924-09-21T05:59:59+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1924-09-21T06:00:00+00:00").tz("America/Toronto").zone(), 300, "1924-09-21T06:00:00+00:00 should be 300 minutes offset in EST"); t.done(); }, "1925" : function (t) { t.equal(moment("1925-05-03T06:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1925-05-03T06:59:59+00:00 should be 01:59:59 EST"); t.equal(moment("1925-05-03T07:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "03:00:00", "1925-05-03T07:00:00+00:00 should be 03:00:00 EDT"); t.equal(moment("1925-09-20T05:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1925-09-20T05:59:59+00:00 should be 01:59:59 EDT"); t.equal(moment("1925-09-20T06:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:00:00", "1925-09-20T06:00:00+00:00 should be 01:00:00 EST"); t.equal(moment("1925-05-03T06:59:59+00:00").tz("America/Toronto").zone(), 300, "1925-05-03T06:59:59+00:00 should be 300 minutes offset in EST"); t.equal(moment("1925-05-03T07:00:00+00:00").tz("America/Toronto").zone(), 240, "1925-05-03T07:00:00+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1925-09-20T05:59:59+00:00").tz("America/Toronto").zone(), 240, "1925-09-20T05:59:59+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1925-09-20T06:00:00+00:00").tz("America/Toronto").zone(), 300, "1925-09-20T06:00:00+00:00 should be 300 minutes offset in EST"); t.done(); }, "1926" : function (t) { t.equal(moment("1926-05-02T06:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1926-05-02T06:59:59+00:00 should be 01:59:59 EST"); t.equal(moment("1926-05-02T07:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "03:00:00", "1926-05-02T07:00:00+00:00 should be 03:00:00 EDT"); t.equal(moment("1926-09-19T05:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1926-09-19T05:59:59+00:00 should be 01:59:59 EDT"); t.equal(moment("1926-09-19T06:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:00:00", "1926-09-19T06:00:00+00:00 should be 01:00:00 EST"); t.equal(moment("1926-05-02T06:59:59+00:00").tz("America/Toronto").zone(), 300, "1926-05-02T06:59:59+00:00 should be 300 minutes offset in EST"); t.equal(moment("1926-05-02T07:00:00+00:00").tz("America/Toronto").zone(), 240, "1926-05-02T07:00:00+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1926-09-19T05:59:59+00:00").tz("America/Toronto").zone(), 240, "1926-09-19T05:59:59+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1926-09-19T06:00:00+00:00").tz("America/Toronto").zone(), 300, "1926-09-19T06:00:00+00:00 should be 300 minutes offset in EST"); t.done(); }, "1927" : function (t) { t.equal(moment("1927-05-01T06:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1927-05-01T06:59:59+00:00 should be 01:59:59 EST"); t.equal(moment("1927-05-01T07:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "03:00:00", "1927-05-01T07:00:00+00:00 should be 03:00:00 EDT"); t.equal(moment("1927-09-25T05:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1927-09-25T05:59:59+00:00 should be 01:59:59 EDT"); t.equal(moment("1927-09-25T06:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:00:00", "1927-09-25T06:00:00+00:00 should be 01:00:00 EST"); t.equal(moment("1927-05-01T06:59:59+00:00").tz("America/Toronto").zone(), 300, "1927-05-01T06:59:59+00:00 should be 300 minutes offset in EST"); t.equal(moment("1927-05-01T07:00:00+00:00").tz("America/Toronto").zone(), 240, "1927-05-01T07:00:00+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1927-09-25T05:59:59+00:00").tz("America/Toronto").zone(), 240, "1927-09-25T05:59:59+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1927-09-25T06:00:00+00:00").tz("America/Toronto").zone(), 300, "1927-09-25T06:00:00+00:00 should be 300 minutes offset in EST"); t.done(); }, "1928" : function (t) { t.equal(moment("1928-04-29T06:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1928-04-29T06:59:59+00:00 should be 01:59:59 EST"); t.equal(moment("1928-04-29T07:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "03:00:00", "1928-04-29T07:00:00+00:00 should be 03:00:00 EDT"); t.equal(moment("1928-09-30T05:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1928-09-30T05:59:59+00:00 should be 01:59:59 EDT"); t.equal(moment("1928-09-30T06:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:00:00", "1928-09-30T06:00:00+00:00 should be 01:00:00 EST"); t.equal(moment("1928-04-29T06:59:59+00:00").tz("America/Toronto").zone(), 300, "1928-04-29T06:59:59+00:00 should be 300 minutes offset in EST"); t.equal(moment("1928-04-29T07:00:00+00:00").tz("America/Toronto").zone(), 240, "1928-04-29T07:00:00+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1928-09-30T05:59:59+00:00").tz("America/Toronto").zone(), 240, "1928-09-30T05:59:59+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1928-09-30T06:00:00+00:00").tz("America/Toronto").zone(), 300, "1928-09-30T06:00:00+00:00 should be 300 minutes offset in EST"); t.done(); }, "1929" : function (t) { t.equal(moment("1929-04-28T06:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1929-04-28T06:59:59+00:00 should be 01:59:59 EST"); t.equal(moment("1929-04-28T07:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "03:00:00", "1929-04-28T07:00:00+00:00 should be 03:00:00 EDT"); t.equal(moment("1929-09-29T05:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1929-09-29T05:59:59+00:00 should be 01:59:59 EDT"); t.equal(moment("1929-09-29T06:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:00:00", "1929-09-29T06:00:00+00:00 should be 01:00:00 EST"); t.equal(moment("1929-04-28T06:59:59+00:00").tz("America/Toronto").zone(), 300, "1929-04-28T06:59:59+00:00 should be 300 minutes offset in EST"); t.equal(moment("1929-04-28T07:00:00+00:00").tz("America/Toronto").zone(), 240, "1929-04-28T07:00:00+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1929-09-29T05:59:59+00:00").tz("America/Toronto").zone(), 240, "1929-09-29T05:59:59+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1929-09-29T06:00:00+00:00").tz("America/Toronto").zone(), 300, "1929-09-29T06:00:00+00:00 should be 300 minutes offset in EST"); t.done(); }, "1930" : function (t) { t.equal(moment("1930-04-27T06:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1930-04-27T06:59:59+00:00 should be 01:59:59 EST"); t.equal(moment("1930-04-27T07:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "03:00:00", "1930-04-27T07:00:00+00:00 should be 03:00:00 EDT"); t.equal(moment("1930-09-28T05:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1930-09-28T05:59:59+00:00 should be 01:59:59 EDT"); t.equal(moment("1930-09-28T06:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:00:00", "1930-09-28T06:00:00+00:00 should be 01:00:00 EST"); t.equal(moment("1930-04-27T06:59:59+00:00").tz("America/Toronto").zone(), 300, "1930-04-27T06:59:59+00:00 should be 300 minutes offset in EST"); t.equal(moment("1930-04-27T07:00:00+00:00").tz("America/Toronto").zone(), 240, "1930-04-27T07:00:00+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1930-09-28T05:59:59+00:00").tz("America/Toronto").zone(), 240, "1930-09-28T05:59:59+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1930-09-28T06:00:00+00:00").tz("America/Toronto").zone(), 300, "1930-09-28T06:00:00+00:00 should be 300 minutes offset in EST"); t.done(); }, "1931" : function (t) { t.equal(moment("1931-04-26T06:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1931-04-26T06:59:59+00:00 should be 01:59:59 EST"); t.equal(moment("1931-04-26T07:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "03:00:00", "1931-04-26T07:00:00+00:00 should be 03:00:00 EDT"); t.equal(moment("1931-09-27T05:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1931-09-27T05:59:59+00:00 should be 01:59:59 EDT"); t.equal(moment("1931-09-27T06:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:00:00", "1931-09-27T06:00:00+00:00 should be 01:00:00 EST"); t.equal(moment("1931-04-26T06:59:59+00:00").tz("America/Toronto").zone(), 300, "1931-04-26T06:59:59+00:00 should be 300 minutes offset in EST"); t.equal(moment("1931-04-26T07:00:00+00:00").tz("America/Toronto").zone(), 240, "1931-04-26T07:00:00+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1931-09-27T05:59:59+00:00").tz("America/Toronto").zone(), 240, "1931-09-27T05:59:59+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1931-09-27T06:00:00+00:00").tz("America/Toronto").zone(), 300, "1931-09-27T06:00:00+00:00 should be 300 minutes offset in EST"); t.done(); }, "1932" : function (t) { t.equal(moment("1932-05-01T06:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1932-05-01T06:59:59+00:00 should be 01:59:59 EST"); t.equal(moment("1932-05-01T07:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "03:00:00", "1932-05-01T07:00:00+00:00 should be 03:00:00 EDT"); t.equal(moment("1932-09-25T05:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1932-09-25T05:59:59+00:00 should be 01:59:59 EDT"); t.equal(moment("1932-09-25T06:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:00:00", "1932-09-25T06:00:00+00:00 should be 01:00:00 EST"); t.equal(moment("1932-05-01T06:59:59+00:00").tz("America/Toronto").zone(), 300, "1932-05-01T06:59:59+00:00 should be 300 minutes offset in EST"); t.equal(moment("1932-05-01T07:00:00+00:00").tz("America/Toronto").zone(), 240, "1932-05-01T07:00:00+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1932-09-25T05:59:59+00:00").tz("America/Toronto").zone(), 240, "1932-09-25T05:59:59+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1932-09-25T06:00:00+00:00").tz("America/Toronto").zone(), 300, "1932-09-25T06:00:00+00:00 should be 300 minutes offset in EST"); t.done(); }, "1933" : function (t) { t.equal(moment("1933-04-30T06:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1933-04-30T06:59:59+00:00 should be 01:59:59 EST"); t.equal(moment("1933-04-30T07:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "03:00:00", "1933-04-30T07:00:00+00:00 should be 03:00:00 EDT"); t.equal(moment("1933-10-01T05:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1933-10-01T05:59:59+00:00 should be 01:59:59 EDT"); t.equal(moment("1933-10-01T06:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:00:00", "1933-10-01T06:00:00+00:00 should be 01:00:00 EST"); t.equal(moment("1933-04-30T06:59:59+00:00").tz("America/Toronto").zone(), 300, "1933-04-30T06:59:59+00:00 should be 300 minutes offset in EST"); t.equal(moment("1933-04-30T07:00:00+00:00").tz("America/Toronto").zone(), 240, "1933-04-30T07:00:00+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1933-10-01T05:59:59+00:00").tz("America/Toronto").zone(), 240, "1933-10-01T05:59:59+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1933-10-01T06:00:00+00:00").tz("America/Toronto").zone(), 300, "1933-10-01T06:00:00+00:00 should be 300 minutes offset in EST"); t.done(); }, "1934" : function (t) { t.equal(moment("1934-04-29T06:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1934-04-29T06:59:59+00:00 should be 01:59:59 EST"); t.equal(moment("1934-04-29T07:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "03:00:00", "1934-04-29T07:00:00+00:00 should be 03:00:00 EDT"); t.equal(moment("1934-09-30T05:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1934-09-30T05:59:59+00:00 should be 01:59:59 EDT"); t.equal(moment("1934-09-30T06:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:00:00", "1934-09-30T06:00:00+00:00 should be 01:00:00 EST"); t.equal(moment("1934-04-29T06:59:59+00:00").tz("America/Toronto").zone(), 300, "1934-04-29T06:59:59+00:00 should be 300 minutes offset in EST"); t.equal(moment("1934-04-29T07:00:00+00:00").tz("America/Toronto").zone(), 240, "1934-04-29T07:00:00+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1934-09-30T05:59:59+00:00").tz("America/Toronto").zone(), 240, "1934-09-30T05:59:59+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1934-09-30T06:00:00+00:00").tz("America/Toronto").zone(), 300, "1934-09-30T06:00:00+00:00 should be 300 minutes offset in EST"); t.done(); }, "1935" : function (t) { t.equal(moment("1935-04-28T06:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1935-04-28T06:59:59+00:00 should be 01:59:59 EST"); t.equal(moment("1935-04-28T07:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "03:00:00", "1935-04-28T07:00:00+00:00 should be 03:00:00 EDT"); t.equal(moment("1935-09-29T05:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1935-09-29T05:59:59+00:00 should be 01:59:59 EDT"); t.equal(moment("1935-09-29T06:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:00:00", "1935-09-29T06:00:00+00:00 should be 01:00:00 EST"); t.equal(moment("1935-04-28T06:59:59+00:00").tz("America/Toronto").zone(), 300, "1935-04-28T06:59:59+00:00 should be 300 minutes offset in EST"); t.equal(moment("1935-04-28T07:00:00+00:00").tz("America/Toronto").zone(), 240, "1935-04-28T07:00:00+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1935-09-29T05:59:59+00:00").tz("America/Toronto").zone(), 240, "1935-09-29T05:59:59+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1935-09-29T06:00:00+00:00").tz("America/Toronto").zone(), 300, "1935-09-29T06:00:00+00:00 should be 300 minutes offset in EST"); t.done(); }, "1936" : function (t) { t.equal(moment("1936-04-26T06:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1936-04-26T06:59:59+00:00 should be 01:59:59 EST"); t.equal(moment("1936-04-26T07:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "03:00:00", "1936-04-26T07:00:00+00:00 should be 03:00:00 EDT"); t.equal(moment("1936-09-27T05:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1936-09-27T05:59:59+00:00 should be 01:59:59 EDT"); t.equal(moment("1936-09-27T06:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:00:00", "1936-09-27T06:00:00+00:00 should be 01:00:00 EST"); t.equal(moment("1936-04-26T06:59:59+00:00").tz("America/Toronto").zone(), 300, "1936-04-26T06:59:59+00:00 should be 300 minutes offset in EST"); t.equal(moment("1936-04-26T07:00:00+00:00").tz("America/Toronto").zone(), 240, "1936-04-26T07:00:00+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1936-09-27T05:59:59+00:00").tz("America/Toronto").zone(), 240, "1936-09-27T05:59:59+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1936-09-27T06:00:00+00:00").tz("America/Toronto").zone(), 300, "1936-09-27T06:00:00+00:00 should be 300 minutes offset in EST"); t.done(); }, "1937" : function (t) { t.equal(moment("1937-04-25T06:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1937-04-25T06:59:59+00:00 should be 01:59:59 EST"); t.equal(moment("1937-04-25T07:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "03:00:00", "1937-04-25T07:00:00+00:00 should be 03:00:00 EDT"); t.equal(moment("1937-09-26T05:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1937-09-26T05:59:59+00:00 should be 01:59:59 EDT"); t.equal(moment("1937-09-26T06:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:00:00", "1937-09-26T06:00:00+00:00 should be 01:00:00 EST"); t.equal(moment("1937-04-25T06:59:59+00:00").tz("America/Toronto").zone(), 300, "1937-04-25T06:59:59+00:00 should be 300 minutes offset in EST"); t.equal(moment("1937-04-25T07:00:00+00:00").tz("America/Toronto").zone(), 240, "1937-04-25T07:00:00+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1937-09-26T05:59:59+00:00").tz("America/Toronto").zone(), 240, "1937-09-26T05:59:59+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1937-09-26T06:00:00+00:00").tz("America/Toronto").zone(), 300, "1937-09-26T06:00:00+00:00 should be 300 minutes offset in EST"); t.done(); }, "1938" : function (t) { t.equal(moment("1938-04-24T06:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1938-04-24T06:59:59+00:00 should be 01:59:59 EST"); t.equal(moment("1938-04-24T07:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "03:00:00", "1938-04-24T07:00:00+00:00 should be 03:00:00 EDT"); t.equal(moment("1938-09-25T05:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1938-09-25T05:59:59+00:00 should be 01:59:59 EDT"); t.equal(moment("1938-09-25T06:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:00:00", "1938-09-25T06:00:00+00:00 should be 01:00:00 EST"); t.equal(moment("1938-04-24T06:59:59+00:00").tz("America/Toronto").zone(), 300, "1938-04-24T06:59:59+00:00 should be 300 minutes offset in EST"); t.equal(moment("1938-04-24T07:00:00+00:00").tz("America/Toronto").zone(), 240, "1938-04-24T07:00:00+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1938-09-25T05:59:59+00:00").tz("America/Toronto").zone(), 240, "1938-09-25T05:59:59+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1938-09-25T06:00:00+00:00").tz("America/Toronto").zone(), 300, "1938-09-25T06:00:00+00:00 should be 300 minutes offset in EST"); t.done(); }, "1939" : function (t) { t.equal(moment("1939-04-30T06:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1939-04-30T06:59:59+00:00 should be 01:59:59 EST"); t.equal(moment("1939-04-30T07:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "03:00:00", "1939-04-30T07:00:00+00:00 should be 03:00:00 EDT"); t.equal(moment("1939-09-24T05:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1939-09-24T05:59:59+00:00 should be 01:59:59 EDT"); t.equal(moment("1939-09-24T06:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:00:00", "1939-09-24T06:00:00+00:00 should be 01:00:00 EST"); t.equal(moment("1939-04-30T06:59:59+00:00").tz("America/Toronto").zone(), 300, "1939-04-30T06:59:59+00:00 should be 300 minutes offset in EST"); t.equal(moment("1939-04-30T07:00:00+00:00").tz("America/Toronto").zone(), 240, "1939-04-30T07:00:00+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1939-09-24T05:59:59+00:00").tz("America/Toronto").zone(), 240, "1939-09-24T05:59:59+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1939-09-24T06:00:00+00:00").tz("America/Toronto").zone(), 300, "1939-09-24T06:00:00+00:00 should be 300 minutes offset in EST"); t.done(); }, "1940" : function (t) { t.equal(moment("1940-04-28T06:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1940-04-28T06:59:59+00:00 should be 01:59:59 EST"); t.equal(moment("1940-04-28T07:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "03:00:00", "1940-04-28T07:00:00+00:00 should be 03:00:00 EDT"); t.equal(moment("1940-04-28T06:59:59+00:00").tz("America/Toronto").zone(), 300, "1940-04-28T06:59:59+00:00 should be 300 minutes offset in EST"); t.equal(moment("1940-04-28T07:00:00+00:00").tz("America/Toronto").zone(), 240, "1940-04-28T07:00:00+00:00 should be 240 minutes offset in EDT"); t.done(); }, "1942" : function (t) { t.equal(moment("1942-02-09T06:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "02:59:59", "1942-02-09T06:59:59+00:00 should be 02:59:59 EDT"); t.equal(moment("1942-02-09T07:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "03:00:00", "1942-02-09T07:00:00+00:00 should be 03:00:00 EWT"); t.equal(moment("1942-02-09T06:59:59+00:00").tz("America/Toronto").zone(), 240, "1942-02-09T06:59:59+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1942-02-09T07:00:00+00:00").tz("America/Toronto").zone(), 240, "1942-02-09T07:00:00+00:00 should be 240 minutes offset in EWT"); t.done(); }, "1945" : function (t) { t.equal(moment("1945-08-14T22:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "18:59:59", "1945-08-14T22:59:59+00:00 should be 18:59:59 EWT"); t.equal(moment("1945-08-14T23:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "19:00:00", "1945-08-14T23:00:00+00:00 should be 19:00:00 EPT"); t.equal(moment("1945-09-30T05:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1945-09-30T05:59:59+00:00 should be 01:59:59 EPT"); t.equal(moment("1945-09-30T06:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:00:00", "1945-09-30T06:00:00+00:00 should be 01:00:00 EST"); t.equal(moment("1945-08-14T22:59:59+00:00").tz("America/Toronto").zone(), 240, "1945-08-14T22:59:59+00:00 should be 240 minutes offset in EWT"); t.equal(moment("1945-08-14T23:00:00+00:00").tz("America/Toronto").zone(), 240, "1945-08-14T23:00:00+00:00 should be 240 minutes offset in EPT"); t.equal(moment("1945-09-30T05:59:59+00:00").tz("America/Toronto").zone(), 240, "1945-09-30T05:59:59+00:00 should be 240 minutes offset in EPT"); t.equal(moment("1945-09-30T06:00:00+00:00").tz("America/Toronto").zone(), 300, "1945-09-30T06:00:00+00:00 should be 300 minutes offset in EST"); t.done(); }, "1946" : function (t) { t.equal(moment("1946-04-28T06:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1946-04-28T06:59:59+00:00 should be 01:59:59 EST"); t.equal(moment("1946-04-28T07:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "03:00:00", "1946-04-28T07:00:00+00:00 should be 03:00:00 EDT"); t.equal(moment("1946-09-29T05:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1946-09-29T05:59:59+00:00 should be 01:59:59 EDT"); t.equal(moment("1946-09-29T06:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:00:00", "1946-09-29T06:00:00+00:00 should be 01:00:00 EST"); t.equal(moment("1946-04-28T06:59:59+00:00").tz("America/Toronto").zone(), 300, "1946-04-28T06:59:59+00:00 should be 300 minutes offset in EST"); t.equal(moment("1946-04-28T07:00:00+00:00").tz("America/Toronto").zone(), 240, "1946-04-28T07:00:00+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1946-09-29T05:59:59+00:00").tz("America/Toronto").zone(), 240, "1946-09-29T05:59:59+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1946-09-29T06:00:00+00:00").tz("America/Toronto").zone(), 300, "1946-09-29T06:00:00+00:00 should be 300 minutes offset in EST"); t.done(); }, "1947" : function (t) { t.equal(moment("1947-04-27T04:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "23:59:59", "1947-04-27T04:59:59+00:00 should be 23:59:59 EST"); t.equal(moment("1947-04-27T05:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:00:00", "1947-04-27T05:00:00+00:00 should be 01:00:00 EDT"); t.equal(moment("1947-09-28T03:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "23:59:59", "1947-09-28T03:59:59+00:00 should be 23:59:59 EDT"); t.equal(moment("1947-09-28T04:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "23:00:00", "1947-09-28T04:00:00+00:00 should be 23:00:00 EST"); t.equal(moment("1947-04-27T04:59:59+00:00").tz("America/Toronto").zone(), 300, "1947-04-27T04:59:59+00:00 should be 300 minutes offset in EST"); t.equal(moment("1947-04-27T05:00:00+00:00").tz("America/Toronto").zone(), 240, "1947-04-27T05:00:00+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1947-09-28T03:59:59+00:00").tz("America/Toronto").zone(), 240, "1947-09-28T03:59:59+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1947-09-28T04:00:00+00:00").tz("America/Toronto").zone(), 300, "1947-09-28T04:00:00+00:00 should be 300 minutes offset in EST"); t.done(); }, "1948" : function (t) { t.equal(moment("1948-04-25T04:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "23:59:59", "1948-04-25T04:59:59+00:00 should be 23:59:59 EST"); t.equal(moment("1948-04-25T05:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:00:00", "1948-04-25T05:00:00+00:00 should be 01:00:00 EDT"); t.equal(moment("1948-09-26T03:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "23:59:59", "1948-09-26T03:59:59+00:00 should be 23:59:59 EDT"); t.equal(moment("1948-09-26T04:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "23:00:00", "1948-09-26T04:00:00+00:00 should be 23:00:00 EST"); t.equal(moment("1948-04-25T04:59:59+00:00").tz("America/Toronto").zone(), 300, "1948-04-25T04:59:59+00:00 should be 300 minutes offset in EST"); t.equal(moment("1948-04-25T05:00:00+00:00").tz("America/Toronto").zone(), 240, "1948-04-25T05:00:00+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1948-09-26T03:59:59+00:00").tz("America/Toronto").zone(), 240, "1948-09-26T03:59:59+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1948-09-26T04:00:00+00:00").tz("America/Toronto").zone(), 300, "1948-09-26T04:00:00+00:00 should be 300 minutes offset in EST"); t.done(); }, "1949" : function (t) { t.equal(moment("1949-04-24T04:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "23:59:59", "1949-04-24T04:59:59+00:00 should be 23:59:59 EST"); t.equal(moment("1949-04-24T05:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:00:00", "1949-04-24T05:00:00+00:00 should be 01:00:00 EDT"); t.equal(moment("1949-11-27T03:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "23:59:59", "1949-11-27T03:59:59+00:00 should be 23:59:59 EDT"); t.equal(moment("1949-11-27T04:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "23:00:00", "1949-11-27T04:00:00+00:00 should be 23:00:00 EST"); t.equal(moment("1949-04-24T04:59:59+00:00").tz("America/Toronto").zone(), 300, "1949-04-24T04:59:59+00:00 should be 300 minutes offset in EST"); t.equal(moment("1949-04-24T05:00:00+00:00").tz("America/Toronto").zone(), 240, "1949-04-24T05:00:00+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1949-11-27T03:59:59+00:00").tz("America/Toronto").zone(), 240, "1949-11-27T03:59:59+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1949-11-27T04:00:00+00:00").tz("America/Toronto").zone(), 300, "1949-11-27T04:00:00+00:00 should be 300 minutes offset in EST"); t.done(); }, "1950" : function (t) { t.equal(moment("1950-04-30T06:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1950-04-30T06:59:59+00:00 should be 01:59:59 EST"); t.equal(moment("1950-04-30T07:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "03:00:00", "1950-04-30T07:00:00+00:00 should be 03:00:00 EDT"); t.equal(moment("1950-11-26T05:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1950-11-26T05:59:59+00:00 should be 01:59:59 EDT"); t.equal(moment("1950-11-26T06:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:00:00", "1950-11-26T06:00:00+00:00 should be 01:00:00 EST"); t.equal(moment("1950-04-30T06:59:59+00:00").tz("America/Toronto").zone(), 300, "1950-04-30T06:59:59+00:00 should be 300 minutes offset in EST"); t.equal(moment("1950-04-30T07:00:00+00:00").tz("America/Toronto").zone(), 240, "1950-04-30T07:00:00+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1950-11-26T05:59:59+00:00").tz("America/Toronto").zone(), 240, "1950-11-26T05:59:59+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1950-11-26T06:00:00+00:00").tz("America/Toronto").zone(), 300, "1950-11-26T06:00:00+00:00 should be 300 minutes offset in EST"); t.done(); }, "1951" : function (t) { t.equal(moment("1951-04-29T06:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1951-04-29T06:59:59+00:00 should be 01:59:59 EST"); t.equal(moment("1951-04-29T07:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "03:00:00", "1951-04-29T07:00:00+00:00 should be 03:00:00 EDT"); t.equal(moment("1951-09-30T05:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1951-09-30T05:59:59+00:00 should be 01:59:59 EDT"); t.equal(moment("1951-09-30T06:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:00:00", "1951-09-30T06:00:00+00:00 should be 01:00:00 EST"); t.equal(moment("1951-04-29T06:59:59+00:00").tz("America/Toronto").zone(), 300, "1951-04-29T06:59:59+00:00 should be 300 minutes offset in EST"); t.equal(moment("1951-04-29T07:00:00+00:00").tz("America/Toronto").zone(), 240, "1951-04-29T07:00:00+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1951-09-30T05:59:59+00:00").tz("America/Toronto").zone(), 240, "1951-09-30T05:59:59+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1951-09-30T06:00:00+00:00").tz("America/Toronto").zone(), 300, "1951-09-30T06:00:00+00:00 should be 300 minutes offset in EST"); t.done(); }, "1952" : function (t) { t.equal(moment("1952-04-27T06:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1952-04-27T06:59:59+00:00 should be 01:59:59 EST"); t.equal(moment("1952-04-27T07:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "03:00:00", "1952-04-27T07:00:00+00:00 should be 03:00:00 EDT"); t.equal(moment("1952-09-28T05:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1952-09-28T05:59:59+00:00 should be 01:59:59 EDT"); t.equal(moment("1952-09-28T06:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:00:00", "1952-09-28T06:00:00+00:00 should be 01:00:00 EST"); t.equal(moment("1952-04-27T06:59:59+00:00").tz("America/Toronto").zone(), 300, "1952-04-27T06:59:59+00:00 should be 300 minutes offset in EST"); t.equal(moment("1952-04-27T07:00:00+00:00").tz("America/Toronto").zone(), 240, "1952-04-27T07:00:00+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1952-09-28T05:59:59+00:00").tz("America/Toronto").zone(), 240, "1952-09-28T05:59:59+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1952-09-28T06:00:00+00:00").tz("America/Toronto").zone(), 300, "1952-09-28T06:00:00+00:00 should be 300 minutes offset in EST"); t.done(); }, "1953" : function (t) { t.equal(moment("1953-04-26T06:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1953-04-26T06:59:59+00:00 should be 01:59:59 EST"); t.equal(moment("1953-04-26T07:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "03:00:00", "1953-04-26T07:00:00+00:00 should be 03:00:00 EDT"); t.equal(moment("1953-09-27T05:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1953-09-27T05:59:59+00:00 should be 01:59:59 EDT"); t.equal(moment("1953-09-27T06:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:00:00", "1953-09-27T06:00:00+00:00 should be 01:00:00 EST"); t.equal(moment("1953-04-26T06:59:59+00:00").tz("America/Toronto").zone(), 300, "1953-04-26T06:59:59+00:00 should be 300 minutes offset in EST"); t.equal(moment("1953-04-26T07:00:00+00:00").tz("America/Toronto").zone(), 240, "1953-04-26T07:00:00+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1953-09-27T05:59:59+00:00").tz("America/Toronto").zone(), 240, "1953-09-27T05:59:59+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1953-09-27T06:00:00+00:00").tz("America/Toronto").zone(), 300, "1953-09-27T06:00:00+00:00 should be 300 minutes offset in EST"); t.done(); }, "1954" : function (t) { t.equal(moment("1954-04-25T06:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1954-04-25T06:59:59+00:00 should be 01:59:59 EST"); t.equal(moment("1954-04-25T07:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "03:00:00", "1954-04-25T07:00:00+00:00 should be 03:00:00 EDT"); t.equal(moment("1954-09-26T05:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1954-09-26T05:59:59+00:00 should be 01:59:59 EDT"); t.equal(moment("1954-09-26T06:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:00:00", "1954-09-26T06:00:00+00:00 should be 01:00:00 EST"); t.equal(moment("1954-04-25T06:59:59+00:00").tz("America/Toronto").zone(), 300, "1954-04-25T06:59:59+00:00 should be 300 minutes offset in EST"); t.equal(moment("1954-04-25T07:00:00+00:00").tz("America/Toronto").zone(), 240, "1954-04-25T07:00:00+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1954-09-26T05:59:59+00:00").tz("America/Toronto").zone(), 240, "1954-09-26T05:59:59+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1954-09-26T06:00:00+00:00").tz("America/Toronto").zone(), 300, "1954-09-26T06:00:00+00:00 should be 300 minutes offset in EST"); t.done(); }, "1955" : function (t) { t.equal(moment("1955-04-24T06:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1955-04-24T06:59:59+00:00 should be 01:59:59 EST"); t.equal(moment("1955-04-24T07:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "03:00:00", "1955-04-24T07:00:00+00:00 should be 03:00:00 EDT"); t.equal(moment("1955-09-25T05:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1955-09-25T05:59:59+00:00 should be 01:59:59 EDT"); t.equal(moment("1955-09-25T06:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:00:00", "1955-09-25T06:00:00+00:00 should be 01:00:00 EST"); t.equal(moment("1955-04-24T06:59:59+00:00").tz("America/Toronto").zone(), 300, "1955-04-24T06:59:59+00:00 should be 300 minutes offset in EST"); t.equal(moment("1955-04-24T07:00:00+00:00").tz("America/Toronto").zone(), 240, "1955-04-24T07:00:00+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1955-09-25T05:59:59+00:00").tz("America/Toronto").zone(), 240, "1955-09-25T05:59:59+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1955-09-25T06:00:00+00:00").tz("America/Toronto").zone(), 300, "1955-09-25T06:00:00+00:00 should be 300 minutes offset in EST"); t.done(); }, "1956" : function (t) { t.equal(moment("1956-04-29T06:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1956-04-29T06:59:59+00:00 should be 01:59:59 EST"); t.equal(moment("1956-04-29T07:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "03:00:00", "1956-04-29T07:00:00+00:00 should be 03:00:00 EDT"); t.equal(moment("1956-09-30T05:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1956-09-30T05:59:59+00:00 should be 01:59:59 EDT"); t.equal(moment("1956-09-30T06:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:00:00", "1956-09-30T06:00:00+00:00 should be 01:00:00 EST"); t.equal(moment("1956-04-29T06:59:59+00:00").tz("America/Toronto").zone(), 300, "1956-04-29T06:59:59+00:00 should be 300 minutes offset in EST"); t.equal(moment("1956-04-29T07:00:00+00:00").tz("America/Toronto").zone(), 240, "1956-04-29T07:00:00+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1956-09-30T05:59:59+00:00").tz("America/Toronto").zone(), 240, "1956-09-30T05:59:59+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1956-09-30T06:00:00+00:00").tz("America/Toronto").zone(), 300, "1956-09-30T06:00:00+00:00 should be 300 minutes offset in EST"); t.done(); }, "1957" : function (t) { t.equal(moment("1957-04-28T06:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1957-04-28T06:59:59+00:00 should be 01:59:59 EST"); t.equal(moment("1957-04-28T07:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "03:00:00", "1957-04-28T07:00:00+00:00 should be 03:00:00 EDT"); t.equal(moment("1957-10-27T05:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1957-10-27T05:59:59+00:00 should be 01:59:59 EDT"); t.equal(moment("1957-10-27T06:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:00:00", "1957-10-27T06:00:00+00:00 should be 01:00:00 EST"); t.equal(moment("1957-04-28T06:59:59+00:00").tz("America/Toronto").zone(), 300, "1957-04-28T06:59:59+00:00 should be 300 minutes offset in EST"); t.equal(moment("1957-04-28T07:00:00+00:00").tz("America/Toronto").zone(), 240, "1957-04-28T07:00:00+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1957-10-27T05:59:59+00:00").tz("America/Toronto").zone(), 240, "1957-10-27T05:59:59+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1957-10-27T06:00:00+00:00").tz("America/Toronto").zone(), 300, "1957-10-27T06:00:00+00:00 should be 300 minutes offset in EST"); t.done(); }, "1958" : function (t) { t.equal(moment("1958-04-27T06:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1958-04-27T06:59:59+00:00 should be 01:59:59 EST"); t.equal(moment("1958-04-27T07:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "03:00:00", "1958-04-27T07:00:00+00:00 should be 03:00:00 EDT"); t.equal(moment("1958-10-26T05:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1958-10-26T05:59:59+00:00 should be 01:59:59 EDT"); t.equal(moment("1958-10-26T06:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:00:00", "1958-10-26T06:00:00+00:00 should be 01:00:00 EST"); t.equal(moment("1958-04-27T06:59:59+00:00").tz("America/Toronto").zone(), 300, "1958-04-27T06:59:59+00:00 should be 300 minutes offset in EST"); t.equal(moment("1958-04-27T07:00:00+00:00").tz("America/Toronto").zone(), 240, "1958-04-27T07:00:00+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1958-10-26T05:59:59+00:00").tz("America/Toronto").zone(), 240, "1958-10-26T05:59:59+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1958-10-26T06:00:00+00:00").tz("America/Toronto").zone(), 300, "1958-10-26T06:00:00+00:00 should be 300 minutes offset in EST"); t.done(); }, "1959" : function (t) { t.equal(moment("1959-04-26T06:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1959-04-26T06:59:59+00:00 should be 01:59:59 EST"); t.equal(moment("1959-04-26T07:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "03:00:00", "1959-04-26T07:00:00+00:00 should be 03:00:00 EDT"); t.equal(moment("1959-10-25T05:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1959-10-25T05:59:59+00:00 should be 01:59:59 EDT"); t.equal(moment("1959-10-25T06:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:00:00", "1959-10-25T06:00:00+00:00 should be 01:00:00 EST"); t.equal(moment("1959-04-26T06:59:59+00:00").tz("America/Toronto").zone(), 300, "1959-04-26T06:59:59+00:00 should be 300 minutes offset in EST"); t.equal(moment("1959-04-26T07:00:00+00:00").tz("America/Toronto").zone(), 240, "1959-04-26T07:00:00+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1959-10-25T05:59:59+00:00").tz("America/Toronto").zone(), 240, "1959-10-25T05:59:59+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1959-10-25T06:00:00+00:00").tz("America/Toronto").zone(), 300, "1959-10-25T06:00:00+00:00 should be 300 minutes offset in EST"); t.done(); }, "1960" : function (t) { t.equal(moment("1960-04-24T06:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1960-04-24T06:59:59+00:00 should be 01:59:59 EST"); t.equal(moment("1960-04-24T07:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "03:00:00", "1960-04-24T07:00:00+00:00 should be 03:00:00 EDT"); t.equal(moment("1960-10-30T05:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1960-10-30T05:59:59+00:00 should be 01:59:59 EDT"); t.equal(moment("1960-10-30T06:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:00:00", "1960-10-30T06:00:00+00:00 should be 01:00:00 EST"); t.equal(moment("1960-04-24T06:59:59+00:00").tz("America/Toronto").zone(), 300, "1960-04-24T06:59:59+00:00 should be 300 minutes offset in EST"); t.equal(moment("1960-04-24T07:00:00+00:00").tz("America/Toronto").zone(), 240, "1960-04-24T07:00:00+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1960-10-30T05:59:59+00:00").tz("America/Toronto").zone(), 240, "1960-10-30T05:59:59+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1960-10-30T06:00:00+00:00").tz("America/Toronto").zone(), 300, "1960-10-30T06:00:00+00:00 should be 300 minutes offset in EST"); t.done(); }, "1961" : function (t) { t.equal(moment("1961-04-30T06:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1961-04-30T06:59:59+00:00 should be 01:59:59 EST"); t.equal(moment("1961-04-30T07:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "03:00:00", "1961-04-30T07:00:00+00:00 should be 03:00:00 EDT"); t.equal(moment("1961-10-29T05:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "1961-10-29T05:59:59+00:00 should be 01:59:59 EDT"); t.equal(moment("1961-10-29T06:00:00+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:00:00", "1961-10-29T06:00:00+00:00 should be 01:00:00 EST"); t.equal(moment("1961-04-30T06:59:59+00:00").tz("America/Toronto").zone(), 300, "1961-04-30T06:59:59+00:00 should be 300 minutes offset in EST"); t.equal(moment("1961-04-30T07:00:00+00:00").tz("America/Toronto").zone(), 240, "1961-04-30T07:00:00+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1961-10-29T05:59:59+00:00").tz("America/Toronto").zone(), 240, "1961-10-29T05:59:59+00:00 should be 240 minutes offset in EDT"); t.equal(moment("1961-10-29T06:00:00+00:00").tz("America/Toronto").zone(), 300, "1961-10-29T06:00:00+00:00 should be 300 minutes offset in EST"); t.done(); }, "1962" : function (t) { t.equal(moment("1962-04-29T06:59:59+00:00").tz("America/Toronto").format("HH:mm:ss"), "01:59:59", "