/j2cl-java-util-Calendar

Apache 2 licensed, pure java implementation of java.util.Calendar

Primary LanguageJavaApache License 2.0Apache-2.0

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

j2cl java.util.Calendar

This project aims to provide a more complete java.util.Calendar. Large portions of the source and javadoc have been copied from the Apache Harmony project.

  • TimeZone ID=GMT is required by java.util.GregorianCalendar.
  • Serialization is not supported, and all support classes and forms including magic methods such as writeReplace have been removed.

Annotation processor arguments

Missing/Unsupported APIs

java.util.Calendar

  • The only calendar implementation available is java.util.GregorianCalendar.
  • java.util.BuddhistCalendar is not yet implemented, ticket
  • java.util.JapaneseImperialCalendar is not yet implemented, ticket

Transpiling

The j2cl-maven-plugin will shade the source during the transpile phase, so Calendar is available in javascript as java.util.Calendar.

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