Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tbrowder/calendarconverter

Allows converting Y/M/D dates between any pair of a set of 15 calendar systems
https://github.com/tbrowder/calendarconverter

Last synced: 23 days ago
JSON representation

Allows converting Y/M/D dates between any pair of a set of 15 calendar systems

Awesome Lists containing this project

README

        

[![Actions Status](https://github.com/tbrowder/CalendarConverter/workflows/test/badge.svg)](https://github.com/tbrowder/CalendarConverter/actions)

NAME
====

CalendarConverter - Allows converting Y/M/D dates between any pair of a set of 15 *regular* calendars

SYNOPSIS
========

```raku
use CalendarConverter;
my $c = CalendarConverter.new: :in, :out;0
say $c.convert: :2021year; # OUTPUT: yyyy/m/d
say $c.convert: :2021year, :10month, :15day; # OUTPUT: yyyy/m/d
```

DESCRIPTION
===========

**CalendarConverter** uses the algorithms of E. G. Richards to convert dates, in Y/M/D form, between any two of 15 *regular* calendars.

Calendars and name keys (from Ref. 1, Table 22.1, p. 290):

Egyptian calendars

No. Calendar name Key Era

1 Egyptian egy Nabonassar 2 Armenian arm Armenian 3 Khwarizmian khw Yazdegerd 4 Persian per Yaxdegerd

Alexandrian calendars

No. Calendar name Key Era

5 Ethiopic eth Incarnation 6 Coptic cop Diocletian 7 Republican rep Republican

Julian calendars

No. Calendar name Key Era

8 Macedonian mac Alexander 9 Syrian syr Alexander 10 Julian Roman jul Christian 11 Gregorian gre Christian

Islamic calendars

No. Calendar name Key Era

12 Islamic A isa Hegira 13 Islamic B isb Hegira

Modern calendars

No. Calendar name Key Era

14 Bahai bah Bahai 15 Saka sak Saka

Planned features
----------------

* subclass Raku Date for a Date::Calendar for any of the 15 calendars

References
----------

1. *Mapping Time: The Calendar and Its History*, E. G. Richards, The Oxford University Press, 2000.

AUTHOR
======

Tom Browder

COPYRIGHT and LICENSE
=====================

Copyright © 2021 Tom Browder

This library is free software; you may redistribute or modify it under the Artistic License 2.0.