You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var momentTZ = require('moment-timezone');
var currentDate = new Date();
var currentYear = currentDate.getFullYear();
var zoneNames = momentTZ.tz.names();
var unpackedZones = [];
zoneNames.forEach(function(zoneName) {
unpackedZones.push(momentTZ.tz.zone(zoneName));
});
var relevantZones = momentTZ.tz.filterYears(unpackedZones, currentYear);
This errors calling momentTZ.tz.filterYears because it does not exist. Was this function removed?
How do I get a list of zones and relevant information to the present?
The text was updated successfully, but these errors were encountered:
As noted at the top of the section in http://momentjs.com/timezone/docs/#/data-utilities/, these utilities are available in moment-timezone-utils.js. I think you should be able to load them for use by changing the first lines to something like this.
These will be moved around a bit with the conversion to es6 modules in #310. What are you trying to accomplish when using filterYears, is there a way we could make this easier to use for you?
Am I missing something?
I do the following:
This errors calling momentTZ.tz.filterYears because it does not exist. Was this function removed?
How do I get a list of zones and relevant information to the present?
The text was updated successfully, but these errors were encountered: