A pure bash (no external commands) command line tool to convert Gregorian calendar dates to Persian calendar dates. Based on jalaali-js
Pipe Gregorian calendar dates in YYYY-MM-DD
format to pcal
to get that date in Persian calendar.
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
This project is licensed under the MIT License - see the LICENSE file for details