Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/zuraguerra/beat_time

Utilities to work with Swatch Internet Time (.beat time).
https://github.com/zuraguerra/beat_time

beat-time elixir erlang swatch-internet-time time

Last synced: about 1 month ago
JSON representation

Utilities to work with Swatch Internet Time (.beat time).

Awesome Lists containing this project

README

        

# .beat Time

[![Hex version](https://img.shields.io/hexpm/v/beat_time.svg)](https://hex.pm/packages/beat_time)
[![Hex license](https://img.shields.io/hexpm/l/beat_time.svg)](https://hex.pm/packages/beat_time)

Utilities to work with [Swatch Internet Time](https://en.wikipedia.org/wiki/Swatch_Internet_Time) (.beat time).

* Every day has 1000.beats.
* Every .beat has 86_400 milliseconds.
* There's no notion of time zones: it's an universal time system based on UTC+01.

## Installation

```elixir
def deps do
[
{:beat_time, "~> 1.0.0"}
]
end
```

## Usage

```elixir
iex> BeatTime.now()
%BeatTime{value: 300}

iex> BeatTime.now() |> BeatTime.format()
"@300"
```