Code Monkey home page Code Monkey logo

gwt-time's Introduction

Maven Central

GWT java.util.time emulation based on ThreeTen backport project

JSR-310 provides a new date and time library for Java SE 8. This project is the port to GWT.

For more information of the base project see the main home page of the project.

This project is NOT an implementation of JSR-310, as that would require jumping through lots of unnecessary hoops. Instead, this is a simple adaptation of "ThreeTen" backport intended to allow users to quickly use the JSR-310 API on GWT client side. This project should be referred to using the "gwt-time" name and the base backport should be referred to using the "ThreeTen" name.

Active development on JSR-310 is at OpenJDK:

That repository used the BSD 3-clause license as the base project.

Issues about the adaptation should be reported here at GitHub. Pull requests and issues will only be considered so far as matching the behavior of the real Java SE. Additional requested features will be rejected.

Time-zone data

The time-zone database is stored as a pre-compiled dat file that is included in the built jar. The actual time-zone data is located in the base project and updated manually.

Localization data

Time zone names

The impementation takes it from the browser with fallback to ZoneId from TZDB

Localized date/time parts (months, weekdays, eras, am/pm)

The impementation takes localized parts from the browser with falback to English.

Localized number formating (zero digit, positive sign, negative sign, decimal separator)

The impementation takes it from the browser with falback to 0, +, - and ..

Date/Time formating

The impementation contains all actual data from CLDR

Using

  • For GWT 2.8.2 add the following project dependency to pom.xml
<dependency>
    <groupId>org.jresearch.gwt.time</groupId>
    <artifactId>org.jresearch.gwt.time</artifactId>
    <version>1.4.12</version>
</dependency>
  • For GWT 2.9.0 add the following project dependency to pom.xml
<dependency>
    <groupId>org.jresearch.gwt.time</groupId>
    <artifactId>org.jresearch.gwt.time</artifactId>
    <version>2.0.0</version>
</dependency>

Unimplemented or partial implemented features

  • Compatibility with J2CL
  • Updates from Java 9-14
  • Localization for IsoFields.QUARTER_OF_YEAR (hard code English quarter text)
  • Chronology prints as ID (take it from browser)
  • Implementation of JapaneseChronology/JapaneseEra/JapaneseDate in the original project based on java.util.Calendar and doesn't works right now.
  • new JapaneseEra.REIWA required Java 13 to build (current is Java 8)
  • java.util.Locale implementation may clash with original GWT implementation. See dicussion on Google Groups and similar issue with gwt-commons-lang3 (the class will separate to another project)
  • Convert to/from java.util.Calendar, to/from java.util.TimeZone, to/from java.text.Format is out of scope of this project

FAQs

  1. What version of Java SE does this project map to? This project currently maps to the contents of release Java SE 8u20.

  2. Will the backport be kept up to date? There are no plans for further releases. However if security issues or bugs are found, or pull requests received then a release may occur.

  3. Is this project derived from OpenJDK? No. This project is derived from the Reference Implementation previously hosted on GitHub. That project had a BSD license, which has been preserved here. Thus, this project is a fork of the fork of the original code before entry to OpenJDK.

Releases

Available in the Maven Central repository

Support

GitHub issues and pull requests should be used when you want to help advance the project.

Note that pull requests and issues will only be considered so far as matching the behavior of Java SE releases. Additional requested features will be rejected.

Pull requests must not be copied from the JDK, because the GPL license is incompatible with the BSD license used here.

Building from sources

  • check out APT project and INSTALL (mvn clean install) it.
  • check out this project
  • mvn clean install
  • The project use the parent pom located on Sonatype snapshot repository.
<repositories>
    <repository>
        <id>oss.sonatype.org-snapshot</id>
        <url>http://oss.sonatype.org/content/repositories/snapshots</url>
        <releases><enabled>false</enabled></releases>
        <snapshots><enabled>true</enabled></snapshots>
    </repository>
</repositories>

or download directly https://oss.sonatype.org/content/repositories/snapshots/org/jresearch/org.jresearch.pom/29-SNAPSHOT/

gwt-time's People

Contributors

barend-xebia avatar cgendreau avatar dlew avatar ericksli avatar fabfas avatar fabiokung avatar foal avatar github-actions[bot] avatar graben avatar grahamborland avatar hedefalk avatar jakewharton avatar jespersm avatar jodastephen avatar jpgough avatar keithharris avatar kemokid avatar kiskae avatar lhochet avatar marschall avatar mirland avatar mmallozzi avatar pamalyshev avatar pithu avatar renjith4 avatar richardwarburton avatar rogerriggs avatar sjmisterm avatar sschaap avatar toadzky avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.