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.
- Host: GitHub
- URL: https://github.com/mohrezfadaei/multical
- Owner: mohrezfadaei
- License: apache-2.0
- Created: 2025-03-10T14:31:38.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-03-10T14:36:04.000Z (8 months ago)
- Last Synced: 2025-03-30T16:01:47.625Z (7 months ago)
- Topics: calendar, jalali, jalali-calendar, khayyam, python
- Language: Python
- Homepage:
- Size: 14.6 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
```
- `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
```