Skip to content

A TimeZone implementation that may be transpiled to javascript.

License

Notifications You must be signed in to change notification settings

mP1/j2cl-java-util-TimeZone

Repository files navigation

Build Status Coverage Status License Language grade: Java Total alerts J2CL compatible

java.util.TimeZone

This project aims to provide a mostly complete pure Java java.util.TimeZone.

  • Only selected ids/TimeZones will appear in methods like java.util.TimeZone#getAvailableIDs and java.util.TimeZone#getTimeZone.
  • Localization data for java.util.TimeZone#getDisplay is only provided for selected locales, timezone ids at build time by an annotation processor.
  • Serialization is not supported, and all support classes and forms including magic methods such as writeReplace are removed.

defines

A default java.util.TimeZone is required and must appear within the j2cl-maven-plugin defines section.

<walkingkooka.j2cl.java.util.timezone.TimeZone.DEFAULT>Australia/Sydney</walkingkooka.j2cl.java.util.timezone.TimeZoneDEFAULT>

Annotation processor arguments

Unsupported APIs

java.util.TimeZone

  • setId throws UnsupportedOperationException, timezones are immutable

java.util.SimpleTimeZone

  • Class missing

Transpiling

The j2cl-maven-plugin will shade the source during the transpile phase, so TimeZone is available to the runtime as java.util.TimeZone and something similar for SimpleTimeZone.

IDE build setup

Annotation processors from class path must be enabled as some tests test the output of generated classes.

The star/wildcard may need to be escaped with a backslash.

Intellij -> System Preferences -> Annotation Processors

About

A TimeZone implementation that may be transpiled to javascript.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages