{"id":16964964,"url":"https://github.com/propensive/aviation","last_synced_at":"2025-04-08T03:28:37.098Z","repository":{"id":80754908,"uuid":"580937498","full_name":"propensive/aviation","owner":"propensive","description":"Representations of time, in its various forms, for Scala","archived":false,"fork":false,"pushed_at":"2025-02-12T19:08:01.000Z","size":2128,"stargazers_count":1,"open_issues_count":7,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-06T07:46:35.196Z","etag":null,"topics":["calendars","date","dates","datetime","datetimes","durations","intervals","periods","recurring-events","time","timezone","timezones","timing"],"latest_commit_sha":null,"homepage":"https://propensive.com/temporaneous","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/propensive.png","metadata":{"files":{"readme":".github/readme.md","changelog":null,"contributing":".github/contributing.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-21T20:52:28.000Z","updated_at":"2025-02-12T19:08:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"72814045-1354-4bb3-a68c-91f9fdae42d2","html_url":"https://github.com/propensive/aviation","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/propensive%2Faviation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/propensive%2Faviation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/propensive%2Faviation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/propensive%2Faviation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/propensive","download_url":"https://codeload.github.com/propensive/aviation/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247769616,"owners_count":20993034,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["calendars","date","dates","datetime","datetimes","durations","intervals","periods","recurring-events","time","timezone","timezones","timing"],"created_at":"2024-10-13T23:44:42.423Z","updated_at":"2025-04-08T03:28:37.063Z","avatar_url":"https://github.com/propensive.png","language":"Scala","readme":"[\u003cimg alt=\"GitHub Workflow\" src=\"https://img.shields.io/github/actions/workflow/status/propensive/aviation/main.yml?style=for-the-badge\" height=\"24\"\u003e](https://github.com/propensive/aviation/actions)\n[\u003cimg src=\"https://img.shields.io/discord/633198088311537684?color=8899f7\u0026label=DISCORD\u0026style=for-the-badge\" height=\"24\"\u003e](https://discord.com/invite/MBUrkTgMnA)\n\u003cimg src=\"/doc/images/github.png\" valign=\"middle\"\u003e\n\n# Aviation\n\n__Representations of time, in its various forms__\n\nThe representation of time is complex, in part because the domain is\nintrinsically complicated, and in part because we mean by \"time\" is\ndifferent in different contexts. _Aviation_ is an attempt to rationalize this\ncomplexity by providing immutable representations of a variety concepts\nrelating to time and operations between them, taking advantage of the\nopportunities Scala offers to make these APIs as intuitive as possible.\n\n## Features\n\n- representations points in time and lengths of time, in both exact/universal and civil forms\n- types are all immutable and typesafe\n- intuitive constructors for civil date and time values\n- customisable rules for adding civil time units\n- supports different calendar systems\n- use and convert between different timezones and calendar systems\n\n\n## Availability\n\n\n\n\n\n\n\n## Getting Started\n\n_Aviation_ provides a variety of types representing and working with different time-related concepts.\n\n### On Time\n\n_Time_ is a complicated concept in several ways. On a physical abstraction, we\ncan pinpoint an instant in time and order it as happening _before_ or _after_\nanother instant, provided they happen in the same place. We can consider the\ndifference between two instants, and measure it by comparison to reference\nevents that occur with a known regularly. We can relate _time_ to _distance_\nusing the speed of light, to [partially\norder](https://en.wikipedia.org/wiki/Special_relativity) events in different\nlocations.\n\nIn a geological and heliocentric context, we talk about instants and durations\nwith reference to the rotation of the Earth around the sun, the rotation of\nEarth on its axis, and the phase of the moon, as well as with arbitrary\nsubdivisions based on historical convention and [highly composite\nnumbers](https://en.wikipedia.org/wiki/Highly_composite_number), and sometimes\nreligious convention.\n\nThe measurements we use may have different meanings in different locations on\nEarth (or conversely, the same measurement may be represented differently in\ndifferent locations), and different systems for representing the measurements\nhave been in use at different times in different places. The relationships\nbetween different units of measurement are [not usually\ndecimal](https://en.wikipedia.org/wiki/12-hour_clock), [not always\nconstant](https://en.wikipedia.org/wiki/Thirty_Days_Hath_September), not always\nexact subdivisions, and [may not even be known in\nadvance](https://en.wikipedia.org/wiki/Leap_second). The same representation\nmay refer to distinct events in the same place, and some representations may\nnot represent valid events on a handful of occasions. The system of\nrepresentation may depend on the prevailing political authority at the time,\nwhich can depend on war.\n\n_Aviation_ makes an ambitious effort to rationalize, systematize and encode\nas much of this complexity as possible.\n\n### Instants and Durations\n\nWe can represent a moment in time, without reference to any other macroscopic\nentity (such as the Earth, and units derived from it), as an `Instant`. An\n`Instant` is represented, internally, as a 64-bit integer corresponding to the\nnumber of non-leap milliseconds since the UNIX epoch.\n\nThe difference between two `Instant`s is represented as a `Duration`, and\nrepresented internally as a 64-bit integral number of milliseconds.\n\n#### International Atomic Time (TAI)\n\nIn addition to `Instant`s (which do not distinguish leap seconds from the\nsecond immediately preceding it), `TaiInstant` implements an instant in\nInternational Atomic Time (TAI) which has no discontinuity at each leap second.\n\nAlthough the concept of an \"instant\" and, in particular, the \"duration\" between\nany two instants _ought_ to be unambiguous, it is not. This is due to the\nexistence of leap seconds, each of which increments the difference between the\nnumbers we use to represent the time in UNIX time (or UTC) and TAI. Since 1972\n(when UTC and UNIX time already differed from TAI by ten seconds), twenty-seven\nleap seconds have been added, either at the end or the middle of the year.\nThese were corrections, based on precise observations of the tiny deviations in\nthe Earth's movement which change its rate of rotation over the previous\nmonths, to try to maintain the invariant that the sun's maximum elevation above\nthe Greenwich Meridian (Solar Noon) should be within one second of Clock Noon\n(i.e. the time at which the clock digits read 12:00:00).\n\n\n\n\n\n## Status\n\nAviation is classified as __fledgling__. For reference, Soundness projects are\ncategorized into one of the following five stability levels:\n\n- _embryonic_: for experimental or demonstrative purposes only, without any guarantees of longevity\n- _fledgling_: of proven utility, seeking contributions, but liable to significant redesigns\n- _maturescent_: major design decisions broady settled, seeking probatory adoption and refinement\n- _dependable_: production-ready, subject to controlled ongoing maintenance and enhancement; tagged as version `1.0.0` or later\n- _adamantine_: proven, reliable and production-ready, with no further breaking changes ever anticipated\n\nProjects at any stability level, even _embryonic_ projects, can still be used,\nas long as caution is taken to avoid a mismatch between the project's stability\nlevel and the required stability and maintainability of your own project.\n\nAviation is designed to be _small_. Its entire source code currently consists\nof 997 lines of code.\n\n## Building\n\nAviation will ultimately be built by Fury, when it is published. In the\nmeantime, two possibilities are offered, however they are acknowledged to be\nfragile, inadequately tested, and unsuitable for anything more than\nexperimentation. They are provided only for the necessity of providing _some_\nanswer to the question, \"how can I try Aviation?\".\n\n1. *Copy the sources into your own project*\n   \n   Read the `fury` file in the repository root to understand Aviation's build\n   structure, dependencies and source location; the file format should be short\n   and quite intuitive. Copy the sources into a source directory in your own\n   project, then repeat (recursively) for each of the dependencies.\n\n   The sources are compiled against the latest nightly release of Scala 3.\n   There should be no problem to compile the project together with all of its\n   dependencies in a single compilation.\n\n2. *Build with [Wrath](https://github.com/propensive/wrath/)*\n\n   Wrath is a bootstrapping script for building Aviation and other projects in\n   the absence of a fully-featured build tool. It is designed to read the `fury`\n   file in the project directory, and produce a collection of JAR files which can\n   be added to a classpath, by compiling the project and all of its dependencies,\n   including the Scala compiler itself.\n   \n   Download the latest version of\n   [`wrath`](https://github.com/propensive/wrath/releases/latest), make it\n   executable, and add it to your path, for example by copying it to\n   `/usr/local/bin/`.\n\n   Clone this repository inside an empty directory, so that the build can\n   safely make clones of repositories it depends on as _peers_ of `aviation`.\n   Run `wrath -F` in the repository root. This will download and compile the\n   latest version of Scala, as well as all of Aviation's dependencies.\n\n   If the build was successful, the compiled JAR files can be found in the\n   `.wrath/dist` directory.\n\n## Contributing\n\nContributors to Aviation are welcome and encouraged. New contributors may like\nto look for issues marked\n[beginner](https://github.com/propensive/aviation/labels/beginner).\n\nWe suggest that all contributors read the [Contributing\nGuide](/contributing.md) to make the process of contributing to Aviation\neasier.\n\nPlease __do not__ contact project maintainers privately with questions unless\nthere is a good reason to keep them private. While it can be tempting to\nrepsond to such questions, private answers cannot be shared with a wider\naudience, and it can result in duplication of effort.\n\n## Author\n\nAviation was designed and developed by Jon Pretty, and commercial support and\ntraining on all aspects of Scala 3 is available from [Propensive\nO\u0026Uuml;](https://propensive.com/).\n\n\n\n## Name\n\n_Tempus fugit_, or, _time flies_.\n\nIn general, Soundness project names are always chosen with some rationale,\nhowever it is usually frivolous. Each name is chosen for more for its\n_uniqueness_ and _intrigue_ than its concision or catchiness, and there is no\nbias towards names with positive or \"nice\" meanings—since many of the libraries\nperform some quite unpleasant tasks.\n\nNames should be English words, though many are obscure or archaic, and it\nshould be noted how willingly English adopts foreign words. Names are generally\nof Greek or Latin origin, and have often arrived in English via a romance\nlanguage.\n\n## Logo\n\nThe logo shows a bird, the archetype of _aviation_, ascending in front of a setting sun.\n\n## License\n\nAviation is copyright \u0026copy; 2025 Jon Pretty \u0026 Propensive O\u0026Uuml;, and\nis made available under the [Apache 2.0 License](/license.md).\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpropensive%2Faviation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpropensive%2Faviation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpropensive%2Faviation/lists"}