Logo

0x5a.live

for different kinds of informations and explorations.

GitHub - davebryson/elixir_milliseconds: Simple library to work with milliseconds

Simple library to work with milliseconds. Contribute to davebryson/elixir_milliseconds development by creating an account on GitHub.

Visit SiteGitHub - davebryson/elixir_milliseconds: Simple library to work with milliseconds

GitHub - davebryson/elixir_milliseconds: Simple library to work with milliseconds

Simple library to work with milliseconds. Contribute to davebryson/elixir_milliseconds development by creating an account on GitHub.

Powered by 0x5a.live ๐Ÿ’—

Millseconds for Elixir

Convert the word version of time to milliseconds and vice-versa.

Examples


import Milliseconds

# Milliseconds to readable time
convert(3600000)
  # => "1h"

# Readable time to milliseconds
convert("2yrs")
  # => 6.31152e10

# Calculate future time

# Milliseconds 24 hours from now
expires_tomorrow = future_time("24hrs")

# Milliseconds 6 hrs from now
expires_later = future_time("6hrs")

# Current time in milliseconds
now = current_time_millis

Inspired by ms.js: https://github.com/rauchg/ms.js

Elixir Resources

are all listed below.

Resources

listed to get explored on!!

Made with โค๏ธ

to provide different kinds of informations and resources.