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

https://github.com/mohrezfadaei/multical

A lightweight CLI tool for converting dates between Jalali, Gregorian, and Lunar Hijri calendars.
https://github.com/mohrezfadaei/multical

calendar jalali jalali-calendar khayyam python

Last synced: 7 months ago
JSON representation

A lightweight CLI tool for converting dates between Jalali, Gregorian, and Lunar Hijri calendars.

Awesome Lists containing this project

README

          

# MultiCal: Multi-Calendar Date Converter

**MultiCal** is a **command-line application** that converts dates between **Jalali (Solar Hijri), Gregorian, and Lunar Hijri (Islamic) calendars**. It also provides the current date in different calendar formats with options for JSON, YAML, and table output.

---

## Features

- Convert between **Jalali, Gregorian, and Lunar Hijri** calendars
- Display **today’s date** in all supported calendar formats
- Output results in **JSON, YAML, or Table format**
- **Fast, accurate, and easy-to-use CLI**

---

## Installation

Run the following command in your terminal:

```sh
bash <(curl -s https://raw.githubusercontent.com/mohrezfadaei/multical/main/install.sh)
```

Once installed, restart your terminal or run:

```sh
source ~/.bashrc # or source ~/.zshrc if using Zsh
```

Now, you can run MultiCal using:

```sh
multical today --to all
```

> **NOTE**
>
> If you want to uninstall MultiCal persitantly on your system issue the following commands:
>
> ```sh
> bash <(curl -s https://raw.githubusercontent.com/mohrezfadaei/multical/main/uninstall.sh)
> ```

## Usage

### Convert a Date

```sh
multical convert --mode [j2g|g2j|g2l|l2g|j2l|l2j] --year --month --day

[--format json|yaml|table]
```

- `j2g` → Jalali to Gregorian
- `g2j` → Gregorian to Jalali
- `g2l` → Gregorian to Lunar Hijri
- `l2g` → Lunar Hijri to Gregorian
- `j2l` → Jalali to Lunar Hijri
- `l2j` → Lunar Hijri to Jalali

**Example:** Convert **Jalali 1403-12-20** to **Gregorian**

```sh
multical convert --mode j2g --year 1403 --month 12 --day 20
```

**Example:** Convert and output in **JSON**

```sh
multical convert --mode j2g --year 1403 --month 12 --day 20 --format json
```

---

### Show Today’s Date in Different Calendars

```sh
multical today --to [jalali|gregorian|lunar|all] [--format json|yaml|table]
```

**Example:** Show **today’s date** in all formats

```sh
multical today --to all
```

**Example:** Show today’s date in **YAML format**

```sh
multical today --to all --format yaml
```