I'm trying to utilize the moment.js library in my script.js file, specifically to determine time zone eligibility. I've loaded the moment.js and moment-timezone-wth-data.js files per the momentjs.com website.
Moment seems to be working fine. If I run the following code, everything seems to be working:
var testnow = moment().format('MMM DD h:mm A');
However, if I attempt to format via a time zone (see below), I receive the following error: moment(...).tz is not a function.
var newchatdate = moment().tz("America/Los_Angeles").format();
Any ideas on why the moment timezone javascript file wouldn't be loading appropriately?
Great workaround David -- I was able to reproduce the original issue by including the libraries via script tags. Your approach does workaround the issue, however. Thanks for sharing!