Skip to content
/ pcal Public

Command line tool to convert Gregorian calendar dates to Persian calendar dates

License

Notifications You must be signed in to change notification settings

a5hk/pcal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

pcal

A pure bash (no external commands) command line tool to convert Gregorian calendar dates to Persian calendar dates. Based on jalaali-js

Getting Started

Pipe Gregorian calendar dates in YYYY-MM-DD format to pcal to get that date in Persian calendar.

examples

If you have put pcal somewhere in your path:

echo "2019-07-26" | pcal #1398-05-04

Or if it is not in your path:

echo "2019-07-26" | /path/to/pcal #1398-05-04

To use a different output delimiter:

echo "2019-07-26" | pcal -D / #1398/05/04

To use a different input delimiter:

echo "2019/07/26" | pcal -d / #1398-05-04

To convert persian date to gregorian date:

echo 1398-05-04 | pcal -g #2019-07-26

Current persian date:

pcal -t #1398-05-17

Display a calendar (current month) :

pcal -m

current month

License

This project is licensed under the MIT License - see the LICENSE file for details