ascendtech / gwt-momentjs

Light JSInterop wrapper for moment.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gwt-momentjs

Light JSInterop wrapper for moment.js

Getting Started

Gradle

Add AST Maven Repo

  allprojects {
    repositories {
      ...
      maven { url 'https://maven.ascend-tech.us/repo' }
    }
  }

Add Dependency:

  compile 'us.ascendtech:momentjs:0.1.9'
  compile 'us.ascendtech:momentjs:0.1.9:sources'

Maven

Add JitPack

  <repositories>
    <repository>
      <id>AST Maven</id>
      <url>https://maven.ascend-tech.us/repo</url>
    </repository>
  </repositories>

Add Dependency

  <dependency>
    <groupId>us.ascendtech</groupId>
    <artifactId>momentjs</artifactId>
    <version>0.1.9</version>
  </dependency>
  <dependency>
    <groupId>us.ascendtech</groupId>
    <artifactId>momentjs</artifactId>
    <version>0.1.9</version>
    <classifier>sources</classifier>
  </dependency>

Example in Java

Add dependency to gwt.xml

<inherits name="us.ascendtech.MomentJS"/>
double year = new MomentJS().year();
String formattedDate = new MomentJS().format("MM-DD-YYYY");

About

Light JSInterop wrapper for moment.js

License:Apache License 2.0


Languages

Language:Kotlin 54.9%Language:Java 45.1%