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

https://github.com/info-mono/ms2duration

⏲️ Milliseconds to duration converter
https://github.com/info-mono/ms2duration

basher bpkg cli converter duration info-mono posix terminal time

Last synced: 7 months ago
JSON representation

⏲️ Milliseconds to duration converter

Awesome Lists containing this project

README

          

ms2duration


Milliseconds to duration converter


License: GPL-3.0 Development completed

## 💡 About
`ms2duration` is a tool to convert milliseconds to a full durations represent a length of time written in [`portable sh`](https://github.com/dylanaraps/pure-sh-bible) inspired by [Nushell's duration data type](https://www.nushell.sh/book/types_of_data.html#duration) and [Starship's Command duration module](https://starship.rs/config/#command-duration).

## 🚀 Setup
### 🧾 Dependencies
- [Unix commands](https://en.wikipedia.org/wiki/List_of_Unix_commands) to process

### 📥 Installation
#### 🔧 Manually
Option 1: using `curl`
```sh
curl https://raw.githubusercontent.com/info-mono/ms2duration/main/bin/ms2duration > ~/.local/bin/ms2duration
chmod +x ~/.local/bin/ms2duration
```

Option 2: using `git`
```sh
git clone https://github.com/info-mono/ms2duration.git ~/.local/share/ms2duration
ln -s ~/.local/share/ms2duration/bin/ms2duration ~/.local/bin/ms2duration
```

#### 📦 Package manager
For [Bpkg](https://github.com/bpkg/bpkg) user:
```sh
bpkg install info-mono/ms2duration
```

For [Basher](https://github.com/basherpm/basher) user:
```sh
basher install info-mono/ms2duration
```

> *If you can and want to port ms2duration to other package managers, feel free to do so.*

## ⌨️ Usage
Run 'ms2duration' in the terminal:
```sh
ms2duration MILLISECONDS
```

## 💌 Credits
Special thanks to:
- [**Nushell**](https://www.nushell.sh) by [it's contributors](https://github.com/nushell/nushell/graphs/contributors)
- [**Starship**](https://starship.rs) by [it's contributors](https://github.com/starship/starship/graphs/contributors)





---

>

Made with ❤️ by @info-mono


>
>

Buy Me a Coffee