Skip to content

Commit

Permalink
Updated changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
ellenaua committed Feb 21, 2020
1 parent dc49a03 commit d7f687e
Show file tree
Hide file tree
Showing 16 changed files with 790 additions and 797 deletions.
3 changes: 3 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ module.exports = function(grunt) {
"tests/zones/**/*.js",
"tests/countries/*.js"
],
countries: [
"tests/countries/*.js"
],
core : [
"tests/moment-timezone/*.js"
]
Expand Down
49 changes: 23 additions & 26 deletions builds/moment-timezone-with-data-10-year-range.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@
this.untils = unpacked.untils;
this.offsets = unpacked.offsets;
this.population = unpacked.population;
this.countries = this._getCountries(this.name);
},

_index : function (timestamp) {
Expand All @@ -167,7 +166,7 @@
}
},

_getCountries : function () {
countries : function () {
var zone_name = this.name;
return Object.keys(countries).filter(function (country_code) {
return countries[country_code].zones.indexOf(zone_name) !== -1;
Expand Down Expand Up @@ -439,7 +438,6 @@
zone = zones[name] = new Zone();
zone._set(link);
zone.name = names[name];
zone.countries = zone._getCountries();
return zone;
}

Expand Down Expand Up @@ -485,16 +483,15 @@

function addCountries (data) {
var i, country_code, country_zones, split;
if (data && data.length) {
for (i = 0; i < data.length; i++) {
split = data[i].split('|');
country_code = split[0].toUpperCase();
country_zones = split[1].split(' ');
countries[country_code] = new Country(
country_code,
country_zones
);
}
if (!data || !data.length) return;
for (i = 0; i < data.length; i++) {
split = data[i].split('|');
country_code = split[0].toUpperCase();
country_zones = split[1].split(' ');
countries[country_code] = new Country(
country_code,
country_zones
);
}
}

Expand All @@ -506,21 +503,21 @@
function zonesForCountry(country, with_offset) {
country = getCountry(country);

if (country) {
if (with_offset) {
return country.zones.map(function (zone_name) {
var zone = getZone(zone_name);
return {
name: zone_name,
offset: zone.utcOffset(new Date())
};
});
} else {
return country.zones;
}
if (!country) return null;

var zones = country.zones.sort();

if (with_offset) {
return zones.map(function (zone_name) {
var zone = getZone(zone_name);
return {
name: zone_name,
offset: zone.utcOffset(new Date())
};
});
}

return null;
return zones;
}

function loadData (data) {
Expand Down
2 changes: 1 addition & 1 deletion builds/moment-timezone-with-data-10-year-range.min.js

Large diffs are not rendered by default.

49 changes: 23 additions & 26 deletions builds/moment-timezone-with-data-1970-2030.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@
this.untils = unpacked.untils;
this.offsets = unpacked.offsets;
this.population = unpacked.population;
this.countries = this._getCountries(this.name);
},

_index : function (timestamp) {
Expand All @@ -167,7 +166,7 @@
}
},

_getCountries : function () {
countries : function () {
var zone_name = this.name;
return Object.keys(countries).filter(function (country_code) {
return countries[country_code].zones.indexOf(zone_name) !== -1;
Expand Down Expand Up @@ -439,7 +438,6 @@
zone = zones[name] = new Zone();
zone._set(link);
zone.name = names[name];
zone.countries = zone._getCountries();
return zone;
}

Expand Down Expand Up @@ -485,16 +483,15 @@

function addCountries (data) {
var i, country_code, country_zones, split;
if (data && data.length) {
for (i = 0; i < data.length; i++) {
split = data[i].split('|');
country_code = split[0].toUpperCase();
country_zones = split[1].split(' ');
countries[country_code] = new Country(
country_code,
country_zones
);
}
if (!data || !data.length) return;
for (i = 0; i < data.length; i++) {
split = data[i].split('|');
country_code = split[0].toUpperCase();
country_zones = split[1].split(' ');
countries[country_code] = new Country(
country_code,
country_zones
);
}
}

Expand All @@ -506,21 +503,21 @@
function zonesForCountry(country, with_offset) {
country = getCountry(country);

if (country) {
if (with_offset) {
return country.zones.map(function (zone_name) {
var zone = getZone(zone_name);
return {
name: zone_name,
offset: zone.utcOffset(new Date())
};
});
} else {
return country.zones;
}
if (!country) return null;

var zones = country.zones.sort();

if (with_offset) {
return zones.map(function (zone_name) {
var zone = getZone(zone_name);
return {
name: zone_name,
offset: zone.utcOffset(new Date())
};
});
}

return null;
return zones;
}

function loadData (data) {
Expand Down
2 changes: 1 addition & 1 deletion builds/moment-timezone-with-data-1970-2030.min.js

Large diffs are not rendered by default.

49 changes: 23 additions & 26 deletions builds/moment-timezone-with-data-2012-2022.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@
this.untils = unpacked.untils;
this.offsets = unpacked.offsets;
this.population = unpacked.population;
this.countries = this._getCountries(this.name);
},

_index : function (timestamp) {
Expand All @@ -167,7 +166,7 @@
}
},

_getCountries : function () {
countries : function () {
var zone_name = this.name;
return Object.keys(countries).filter(function (country_code) {
return countries[country_code].zones.indexOf(zone_name) !== -1;
Expand Down Expand Up @@ -439,7 +438,6 @@
zone = zones[name] = new Zone();
zone._set(link);
zone.name = names[name];
zone.countries = zone._getCountries();
return zone;
}

Expand Down Expand Up @@ -485,16 +483,15 @@

function addCountries (data) {
var i, country_code, country_zones, split;
if (data && data.length) {
for (i = 0; i < data.length; i++) {
split = data[i].split('|');
country_code = split[0].toUpperCase();
country_zones = split[1].split(' ');
countries[country_code] = new Country(
country_code,
country_zones
);
}
if (!data || !data.length) return;
for (i = 0; i < data.length; i++) {
split = data[i].split('|');
country_code = split[0].toUpperCase();
country_zones = split[1].split(' ');
countries[country_code] = new Country(
country_code,
country_zones
);
}
}

Expand All @@ -506,21 +503,21 @@
function zonesForCountry(country, with_offset) {
country = getCountry(country);

if (country) {
if (with_offset) {
return country.zones.map(function (zone_name) {
var zone = getZone(zone_name);
return {
name: zone_name,
offset: zone.utcOffset(new Date())
};
});
} else {
return country.zones;
}
if (!country) return null;

var zones = country.zones.sort();

if (with_offset) {
return zones.map(function (zone_name) {
var zone = getZone(zone_name);
return {
name: zone_name,
offset: zone.utcOffset(new Date())
};
});
}

return null;
return zones;
}

function loadData (data) {
Expand Down
2 changes: 1 addition & 1 deletion builds/moment-timezone-with-data-2012-2022.min.js

Large diffs are not rendered by default.

49 changes: 23 additions & 26 deletions builds/moment-timezone-with-data.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion builds/moment-timezone-with-data.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit d7f687e

Please sign in to comment.