Skip to content

Neved4/ad2mo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ad2mo - Gregorian to Mekadimo dates! ⌚️

Convert dates from Gregorian "A.D." to Mekadimo date format.

Originally from: mekadimo_date.py

Usage

These variants support standalone execution, reading from stdin and optionally format the output in ISO 8601.

AWK version

Standalone:

$ ./ad2mo.awk
Printuno 64, 0

From standard input:

$ echo $(date -u +"%Y-%m-%d") | ./ad2mo.awk
Printuno 64, 0

Date in ISO 8601 format:

$ ./ad2mo.awk -v iso_fmt=1
0000-01-64

C version

Compile with:

$ make ad2mo

Standalone:

$ ./ad2mo
Printuno 64, 0

Standard input:

$ echo $(date -u +"%Y-%m-%d") | ./ad2mo
Printuno 64, 0

ISO 8601 format:

$ ./ad2mo -v iso_fmt=1
0000-01-64

License

This repository is licensed under the terms of the MIT License.

See the LICENSE file for details.