Giter Site home page Giter Site logo

airac-java's Introduction

airac-java: a small Java library for calculating aviation AIRAC cycle dates

Apache License v2.0 Build Status Code Coverage

Package airac-java provides calculations on Aeronautical Information Regulation And Control (AIRAC) cycles, i.e. cycle identifiers and effective calendar dates.

Regular, planned Aeronautical Information Publications (AIP) as defined by the International Civil Aviation Organization (ICAO) are published and become effective at fixed dates. This package implements the AIRAC cycle definition as published in the ICAO Aeronautical Information Services Manual (DOC 8126; AN/872; 6th Edition; 2003). Test cases validate documented dates from 1998 until 2020, including the rare cases of a 14th cycle, e. g. in the years 1976, 1998, 2020 and 2043.

Example

Instant shalom = Instant.from(ZonedDateTime.of(2012, 8, 26, 0, 0, 0, 0, ZoneOffset.UTC));
String output = String.format("At %s the current AIRAC cycle was %s.\n",
    DateTimeFormatter.ofPattern("yyyy-MM-dd").withZone(ZoneOffset.UTC).format(shalom),
    Airac.fromInstant(shalom).toLongString());
System.out.println(output);

// Output:
// At 2012-08-26 the current AIRAC cycle was 1209 (effective: 2012-08-23; expires: 2012-09-19).

Maven Central

<dependency>
    <groupId>com.ko-sys.av</groupId>
    <artifactId>airac</artifactId>
    <version> <!-- semantic version --> </version>
</dependency>

See also

This is a port of my go library. I did this port basically in order to learn how to use JSR-310 and parametrized JUnit tests.

License

Licensed under the Apache License, Version 2.0.

Wikipedia

Article on AIP / AIRAC cycles: https://en.wikipedia.org/wiki/Aeronautical_Information_Publication

There are wiki macros in that article that do basically the same thing as this library. Though, this library does not trip over the case of 14 cycles per year (e. g. 1998 and 2020).

airac-java's People

Contributors

wjkohnen avatar

Stargazers

 avatar

Watchers

 avatar  avatar  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.