NightMachinery / jalalicli

A CLI utility for Jalali (Shamsi) dates

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

jalalicli

jalalicli is a CLI frontend for go-persian-calendar.

Installation

go get -u -v github.com/NightMachinary/jalalicli

Usage

jalalicli --help
jalalicli is a CLI frontend for https://github.com/yaa110/go-persian-calendar

	Usage:
	  jalalicli today [--jalali-format=<jalali-format> --inc-year=<years> --inc-month=<monthss> --inc-day=<days>]
	  jalalicli tojalali [--gregorian-format=<gregorian-format> --jalali-format=<jalali-format> --inc-year=<years> --inc-month=<months> --inc-day=<days>] <date>
	  jalalicli togregorian [--gregorian-format=<gregorian-format> --inc-year=<years> --inc-month=<months> --inc-day=<days>] [<date>]
	  jalalicli -h | --help

	  togregorian's input should be in a "yyyy/MM/dd" format.
      Date increments are always done in Jalali. Negative numbers are supported.

	Options:
	  -j --jalali-format=<jalali-format>  Jalali format (see the readme of the backend).
	  -g --gregorian-format=<gregorian-format>  Gregorian format (go style). [Default: 2006/01/02]
      -y --inc-year=<years>  Increment output's year by specified amount.
      -m --inc-month=<months>  Increment output's month by specified amount.
      -d --inc-day=<days>  Increment output's day by specified amount.
	  -h --help  Show this screen.
jalalicli today
jalalicli togregorian
1399/12/25
2021/03/15
jalalicli tojalali 2001/09/11
jalalicli tojalali 2001/09/11 --inc-month 1
jalalicli tojalali 2001/09/11 --inc-month 2
jalalicli tojalali 2001/09/11 --inc-month 6
jalalicli tojalali 2001/09/11 --inc-month 11
jalalicli tojalali 2001/09/11 --inc-year 100
jalalicli tojalali 2001/09/11 --inc-day 11
jalalicli tojalali 2001/09/11 --inc-day 12
jalalicli tojalali 2001/09/11 --inc-day 12 --inc-month 1 # Notice that month has incremented first. This is an implementation detail in the underlying library.
# حملات ۱۱ سپتامبر (بیشتر در انگلیسی با ۹/۱۱ نشان داده می‌شود که «نُه، یازده» به انگلیسی «ناین ایلِوِن» خوانده می‌شود) عبارت است از سلسله‌ای از حملات انتحاری که در ۱۱ سپتامبر ۲۰۰۱، مصادف با ۲۰ شهریور ۱۳۸۰ هجری شمسی توسط گروه تروریستی القاعده به رهبری اسامه بن لادن در خاک ایالات متحده آمریکا انجام شد.
1380/06/20
1380/07/20
1380/08/20
1380/12/20
1381/05/20
1480/06/20
1380/06/31
1380/07/01
1380/08/02
jalalicli togregorian 1380/06/20
jalalicli togregorian 1380/06/20 --inc-day 60
jalalicli togregorian 1380/06/20 --inc-month 24
2001/09/11
2001/11/09
2003/09/11
jalalicli togregorian "$(jalalicli today)"
date +"%Y-%m-%d"
2021/03/15
2021-03-15
jalalicli togregorian "$(jalalicli today)" -g '2006 Jan'
2021 Mar
jalalicli tojalali "$(date +"%Y-%m-%d")" -g '2006-01-02' -j 'yy MMM'
99 اسفند
jalalicli togregorian --gregorian-format='unix' "1380/06/20"
1000196999
jalalicli tojalali --gregorian-format='unix' "1000196999"
gdate --date='@1000196999'
1380/06/20
Tue Sep 11 12:59:59 +0430 2001
jalalicli tojalali -j unix -g '2006-01-02' 2001-03-22
gdate -d '@985219200'
985219200
Thu Mar 22 04:30:00 +0430 2001
jalalicli today --inc-year=1 --inc-month=13 --inc-day 10
1402/02/04
jalalicli togregorian --inc-day 365 --inc-month -11
2021/04/07

License

MIT

About

A CLI utility for Jalali (Shamsi) dates

License:MIT License


Languages

Language:Go 100.0%