Moment.js Library Integration
Categories
Component ID
Component name
Component type
Maintenance status
Development status
Component security advisory coverage
Component created
Component changed
Component body
My fork of https://www.drupal.org/project/moment with code from https://www.drupal.org/sandbox/jimmyko/2271513 merged in. The official Moment.js module doesn't appear to do anything based on the code, but rather provides an environment for other modules to include Moment.js and Moment Timezone functions in their own Javascript. Hopefully, this module will eventually become a patch to be merged into the official one, but because of the ways I've modified it, I want to make a separate project for people to download and inspect while I work on making sensible patches for the official project.
What this module does is provide a library definition for Moment and Moment Timezone, provides Drush integration to automatically download both libraries, and loads the javascript files in an implementation of hook_page_build(). This will allow additional modules to use the functions from these libraries to integrate as desired.
In the future, I would like to add administrative tools to allow the end user to use specific time formats as Moment.js formats, automatically changing their display and optionally showing the Timezone, as well. Other functionality is more than welcome as a suggestion.
