<commit_before>
# Java8 Date/Time Support For FreeMarker image:https://travis-ci.org/amedia/freemarker-java-8.svg?branch=master["Build Status", link="https://travis-ci.org/amedia/freemarker-java-8"]

This is a tiny Java library that adds basic format support for the new Java 8 date/time api in FreeMarker.
Unfortunately FreeMarker doesn't support formatting these classes, and there are no implementations being worked on at the moment (http://freemarker.org/contribute.html).

The library has basic formatting support for all classes in the java.time api introduced in Java 8, using the
new https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html[java.time.format.DateTimeFormatter].

This is not a perfect solution as we cannot add built-ins to FreeMarker from outside code. But its the best we can do until FreeMarker adds full support in the future.

## Requirements

Java 8 or higher.
Tested on Freemarker 2.3.23, but should at least work fine for all 2.3.x versions. Please file an issue if you have problems with other versions.

## Installation

freemarker-java-8 is deployed to the Maven Central Repository. You can include the package in your Maven POM
like this :

[source, xml]
----
<dependency>
    <groupId>no.api.freemarker</groupId>
    <artifactId>freemarker-java8</artifactId>
    <version>1.1.4</version>
</dependency>
----

Make sure to replace the version with the current version found in the pom.

## Usage
<commit_msg>Update README.adoc<commit_after>
# Java8 Date/Time Support For FreeMarker image:https://travis-ci.org/amedia/freemarker-java-8.svg?branch=master["Build Status", link="https://travis-ci.org/amedia/freemarker-java-8"]

This is a tiny Java library that adds basic format support for the new Java 8 date/time api in FreeMarker.
Unfortunately FreeMarker doesn't support formatting these classes, and there are no implementations being worked on at the moment (http://freemarker.org/contribute.html).

The library has basic formatting support for all classes in the java.time api introduced in Java 8, using the
new https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html[java.time.format.DateTimeFormatter].

This is not a perfect solution as we cannot add built-ins to FreeMarker from outside code. But its the best we can do until FreeMarker adds full support in the future.

Out Cucumber feature test spec will hopefully explain how it all works : https://github.com/amedia/freemarker-java-8/blob/master/src/test/resources/no/api/freemarker/java8/time/datetime.feature

## Requirements

Java 8 or higher.
Tested on Freemarker 2.3.23, but should at least work fine for all 2.3.x versions. Please file an issue if you have problems with other versions.

## Installation

freemarker-java-8 is deployed to the Maven Central Repository. You can include the package in your Maven POM
like this :

[source, xml]
----
<dependency>
    <groupId>no.api.freemarker</groupId>
    <artifactId>freemarker-java8</artifactId>
    <version>1.1.4</version>
</dependency>
----

Make sure to replace the version with the current version found in the pom.

## Usage

{'fraction_non_alphanumeric': 0.08859145952836202, 'fraction_numerical': 0.012109623964308477, 'mean_word_length': 4.32937181663837, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 7, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '592214', 'n_tokens_mistral': 930, 'n_tokens_neox': 886, 'n_words': 360}