udes-moment - Vaadin Add-on Directory
UdeS moment element wrapper for Moment.js
**[ This description is mirrored from README.md at [github.com/UdeSElements/udes-moment](https://github.com//UdeSElements/udes-moment/blob/v2.2.0/README.md) on 2019-05-10 ]**
# \
[![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://www.webcomponents.org/element/UdeSElements/udes-moment)
`udes-moment` is a Polymer 2 wrapper for the [Moment.js](https://momentjs.com/)
library.
There are currently **2** components and **1** mixin available:
- Components
- \
- \
- Mixin
- UdeS.MomentMixin
The `UdeS.MomentImportMixin` is not intented to be use outside this repositery.
All the components and mixins use the `UdeS.LanguageMixin` to automatically
update the date according to the global language.
## What should I use?
You should use the `UdeS.MomentMixin` if you have many dates to format inside
you component. If you have only one or two, use the components instead.
## Configuration
If you use one of the components or one of the mixins, you need to update your
`polymer.json` to includes the Moment.js files:
```json
{
"extraDependencies": [
"bower_components/moment/min/moment.min.js",
"bower_components/moment/locale/*.js"
],
}
```
You also need to update your `sw-precache-config.js` accordingly:
```javascript
/* eslint-disable-next-line no-undef */
module.exports = {
staticFileGlobs: [
'bower_components/moment/locale/*',
'bower_components/moment/min/moment.min.js',
],
};
```
## Demo
```html
```
Documentation
Online Demo
GitHub Homepage
Issue tracker
View on GitHub
udes-moment version 2.1.1
### Dependencies
* moment#moment/moment#^2.0.0
* polymer#Polymer/polymer#^2.0.0
* udes-language-mixin#UdeSElements/udes-language-mixin#^2.0.0
udes-moment version 2.1.2
### Dependencies
* moment#moment/moment#^2.0.0
* polymer#Polymer/polymer#^2.0.0
* udes-language-mixin#UdeSElements/udes-language-mixin#^2.0.0
udes-moment version 2.1.3
### Dependencies
* moment#moment/moment#^2.0.0
* polymer#Polymer/polymer#^2.0.0
* udes-language-mixin#UdeSElements/udes-language-mixin#^2.0.0
udes-moment version 2.2.0
### Dependencies
* moment#moment/moment#^2.0.0
* polymer#Polymer/polymer#^2.0.0
* udes-language-mixin#UdeSElements/udes-language-mixin#^2.0.0
udes-moment version 2.2.1
### Dependencies
* moment#moment/moment#^2.0.0
* polymer#Polymer/polymer#^2.0.0
* udes-language-mixin#UdeSElements/udes-language-mixin#^2.0.0