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 year ago
JSON representation
Utilities to work with Swatch Internet Time (.beat time).
- Host: GitHub
- URL: https://github.com/zuraguerra/beat_time
- Owner: ZuraGuerra
- Created: 2019-06-13T18:34:51.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-09-14T15:18:13.000Z (almost 4 years ago)
- Last Synced: 2025-02-05T14:11:43.038Z (over 1 year ago)
- Topics: beat-time, elixir, erlang, swatch-internet-time, time
- Language: Elixir
- Homepage:
- Size: 8.79 KB
- Stars: 10
- Watchers: 2
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# .beat Time
[](https://hex.pm/packages/beat_time)
[](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"
```