datatracker/ietf/static/js/moment.js
Jennifer Richards 4a5583845e
fix(ui): import moment.js library with moment-timezone support in wrapper (#3977)
* fix: import moment.js library with moment-timezone support in wrapper

Packaging changes broke the mechanism used to make moment.tz available
to javascript code. This eliminates the separate moment.js and
moment-timezone-with-data-10-year-range.js wrappers and instead
imports the timezone-augmented version directly. This provides both
the timezone support and the regular moment features.

* refactor: put moment on window instead of global for consistency
2022-05-18 09:23:07 -05:00

6 lines
292 B
JavaScript

/* Add the moment object to the global scope - needed until inline scripts using
* Moment.js are eliminated. When that happens, can import moment in the js files
* that need it. */
import moment from "moment-timezone/builds/moment-timezone-with-data-10-year-range";
window.moment = moment;