https://github.com/davoudarsalani/action-jdate
Download/install the latest version of jdate
https://github.com/davoudarsalani/action-jdate
alpine calendar docker gnu jalali jcal jdate jdatetime module nongnu persiantools python shamsi
Last synced: 3 months ago
JSON representation
Download/install the latest version of jdate
- Host: GitHub
- URL: https://github.com/davoudarsalani/action-jdate
- Owner: davoudarsalani
- Created: 2021-12-23T16:36:22.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-01-13T08:52:55.000Z (over 3 years ago)
- Last Synced: 2024-12-27T20:44:04.264Z (4 months ago)
- Topics: alpine, calendar, docker, gnu, jalali, jcal, jdate, jdatetime, module, nongnu, persiantools, python, shamsi
- Language: Dockerfile
- Homepage:
- Size: 54.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Download/install the latest version of jdate
![]()
![]()
Jalali Calendar, developed by Ashkan Ghassemi, is:
> ... a small and portable free software library to manipulate date and time in Jalali calendar system.---
```yml
- name: Installing jdate
uses: davoudarsalani/action-jdate@master
with:
source: 'docker-jdate' ## default
```
There are ten options for `source`:
* Use docker image
* `docker-khayyam` will pull `khayyam` docker image/repository (about 61.3MB in size) containing `khayyam` python module on Alpine Linux
* `docker-persiantools` will pull `persiantools` docker image/repository (about 60.8MB in size) containing `persiantools` python module on Alpine Linux
* `docker-jdatetime` will pull `jdatetime` docker image/repository (about 59.8MB in size) containing `jdatetime` python module on Alpine Linux
* `docker-jdate` will pull `jdate` docker image/repository (about 8.22MB in size) containing `jdate` on Alpine Linux
* Download tar.gz file
* `askapache` will download from __askapache.com__
* `gnu` will download from __gnu.org__
* `nongnu` will download from __nongnu.org__
* Clone git repository
* `clone-github` will clone from __github.com__
* `clone-gnu` will clone from __gnu.org__
* `clone-nongnu` will clone from __nongnu.org__For `docker-khayyam`, `docker-persiantools` or `docker-jdatetime` set as source, you may use either of the following commands respectively to set date/time:
```yml
## docker-khayyam
run: date_time="$(docker run --rm -t davoudarsalani/khayyam \
python -c "import khayyam; print(khayyam.JalaliDatetime.now().strftime('%Y-%m-%d %H:%M:%S %A'))")"## docker-persiantools
run: date_time="$(docker run --rm -t davoudarsalani/persiantools \
python -c "from persiantools.jdatetime import JalaliDateTime; print(JalaliDateTime.now().strftime('%Y-%m-%d %H:%M:%S %A'))")"## docker-jdatetime
run: date_time="$(docker run --rm -t davoudarsalani/jdatetime \
python -c "import jdatetime; print(jdatetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S %A'))")"
```
> Note: These three options, as mentioned earlier, use respective python modules.
> The documents state that we can use the same format used for the `datetime` module:
>
>> [khayyam](http://khayyam.dobisel.com/): The package’s API is considered to be exactly the same as the datetime module, so if you are familiar with the datetime, you can read the Migration from python’s builtin datetime.
>
>> [persiantools](https://pypi.org/project/persiantools/): Jalali (Shamsi) date and datetime (based on python datetime's module)
>
>> [jdatetime](https://pypi.org/project/jdatetime/): This module exactly follows Python Standard datetime module’s methods
>Alternatively, if `docker-jdate` is set for source, you can use `jdate` command to get date/time:
```yml
- name: Getting date/time
shell: bash
run: date_time="$(docker run --rm -t davoudarsalani/jdate jdate '+%Y-%m-%d %H:%M:%S %A')"
```
Similarly, if the other options are chosen, you can use `jdate` command:
```yml
run: date_time="$(jdate '+%Y-%m-%d %H:%M:%S %A')"
```> Note: `jdate` and `date` share the same format.
---
* Jalali Calendar homepage: [gnu.org](https://www.gnu.org/savannah-checkouts/non-gnu/jcal/) and [nongnu.org](http://www.nongnu.org/jcal/)
* To get more versions/tags of `khayyam`/`persiantools`/`jdatetime`/`jdate` docker images/repositories, please visit [docker.com](https://hub.docker.com/u/davoudarsalani)
* To install `khayyam` python module, please visit [pypi.org](https://pypi.org/project/Khayyam/) or [dobisel.com](http://khayyam.dobisel.com/)
* To install `persiantools` python module, please visit [pypi.org](https://pypi.org/project/persiantools/) or [github.com](https://github.com/majiidd/persiantools)
* To install `jdatetime` python module, please visit [pypi.org](https://pypi.org/project/jdatetime/) or [github](https://github.com/slashmili/python-jalali)
* To download `jcal` in tar.gz, please visit [askapache.com](http://nongnu.askapache.com/jcal/), [gnu.org](http://download-mirror.savannah.gnu.org/releases/jcal/) or [nongnu.org](http://download.savannah.nongnu.org/releases/jcal/)
* To clone `jcal` repository, please visit [github.com](https://github.com/ashkang/jcal), [gnu.org](http://git.savannah.gnu.org/cgit/jcal.git) or [nongnu.org](http://savannah.nongnu.org/git/?group=jcal)
* For instructions on how to manually download and install `jcal`/`jdate` locally, please visit [wiki.ubuntu.ir](https://wiki.ubuntu.ir/wiki/Jcal) or [wiki.ubuntu.ir](https://wiki.ubuntu.ir/index.php?title=Jcal&oldid=1300)
* For instructions on how to use `jcal`/`jdate`, please visit [nongnu.org](http://www.nongnu.org/jcal/jdate.html) or [mankier.com](https://www.mankier.com/1/jdate)