cosmoz-moment

WebJar for cosmoz-moment

License

License

GroupId

GroupId

org.webjars.bowergithub.neovici
ArtifactId

ArtifactId

cosmoz-moment
Last Version

Last Version

1.0.2
Release Date

Release Date

Type

Type

jar
Description

Description

cosmoz-moment
WebJar for cosmoz-moment
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/neovici/cosmoz-moment

Download cosmoz-moment

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.bowergithub.neovici/cosmoz-moment/ -->
<dependency>
    <groupId>org.webjars.bowergithub.neovici</groupId>
    <artifactId>cosmoz-moment</artifactId>
    <version>1.0.2</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.bowergithub.neovici/cosmoz-moment/
implementation 'org.webjars.bowergithub.neovici:cosmoz-moment:1.0.2'
// https://jarcasting.com/artifacts/org.webjars.bowergithub.neovici/cosmoz-moment/
implementation ("org.webjars.bowergithub.neovici:cosmoz-moment:1.0.2")
'org.webjars.bowergithub.neovici:cosmoz-moment:jar:1.0.2'
<dependency org="org.webjars.bowergithub.neovici" name="cosmoz-moment" rev="1.0.2">
  <artifact name="cosmoz-moment" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.bowergithub.neovici', module='cosmoz-moment', version='1.0.2')
)
libraryDependencies += "org.webjars.bowergithub.neovici" % "cosmoz-moment" % "1.0.2"
[org.webjars.bowergithub.neovici/cosmoz-moment "1.0.2"]

Dependencies

compile (2)

Group / Artifact Type Version
org.webjars.bowergithub.polymer : polymer jar [1.9.0,3)
org.webjars.bowergithub.moment : moment jar [2.17.1,3)

Project Modules

There are no modules declared in this project.

cosmoz-moment

Build Status Published on webcomponents.org semantic-release

cosmoz-moment is a Polymer component for centralized management of Moment.js with locale change distributed notification.

Example

<dom-bind>
	<template is="dom-bind">
		<paper-dropdown-menu label="Locale" value="{{ locale }}">
			<paper-listbox class="dropdown-content" slot="dropdown-content" selected="0">
				<paper-item>en</paper-item>
				<paper-item>fr</paper-item>
				<paper-item>sv</paper-item>
			</paper-listbox>
		</paper-dropdown-menu>
		<cosmoz-moment locale="[[ locale ]]"></cosmoz-moment>
		<div class="message">
			<div><b>Page was loaded</b> <cosmoz-moment-timeago></cosmoz-moment-timeago><br/></div>
			<div><b>Polymer was created</b> <cosmoz-moment-timeago date="2015-05-27"></cosmoz-moment-timeago><br/></div>
		</div>
	</template>
</dom-bind>

Usage

Install

bower install --save Neovici/cosmoz-moment

Add the cosmoz-moment import

<link rel="import" href="bower_components/cosmoz-moment/cosmoz-moment.html" />
<link rel="import" href="bower_components/cosmoz-moment/cosmoz-moment-timeago.html" />

Use it inside your element

cosmoz-moment should only be used once per app to manage the locale and moment.js.

cosmoz-moment-timeago can be used within elements, or directly in the app, multiple times.

<cosmoz-moment locale="[[locale]]"></cosmoz-moment>
<cosmoz-moment-timeago date="2017-06-15"></cosmoz-moment-timeago>

Documentation

See docs for more details

License

cosmoz-moment is created under the terms of the Apache-2.0 license.

org.webjars.bowergithub.neovici

Neovici

Versions

Version
1.0.2