Coptic

NAME

Date::Calendar::Coptic - conversions from / to the Coptic calendar

SYNOPSIS

Converting a Gregorian date to Coptic


use Date::Calendar::Coptic;

my Date                     $Perlcon-Riga-grg;
my Date::Calendar::Coptic   $Perlcon-Riga-cop;

$Perlcon-Riga-grg .= new(2019, 8, 7);
$Perlcon-Riga-cop .= new-from-date($Perlcon-Riga-grg);

say $Perlcon-Riga-cop.strftime("%A %e %B %Y");
#--> Peftoou 1 Mesori 1735

Converting a Coptic date to Gregorian


use Date::Calendar::Coptic;

my Date::Calendar::Coptic   $TPC-Pittsburgh-cop;
my Date                     $TPC-Pittsburgh-grg;

$TPC-Pittsburgh-cop .= new(year => 1735, month => 10, day => 9);
$TPC-Pittsburgh-grg  = $TPC-Pittsburgh-cop.to-date;
say $TPC-Pittsburgh-cop.strftime("%e %B %Y = "), $TPC-Pittsburgh-grg.gist
#--> 9 Paoni 1735 = 2019-06-16

Converting a date while caring about sunset:


use Date::Calendar::Strftime;
use Date::Calendar::Coptic;

my Date::Calendar::Coptic $dt-coptic;
my Date                   $dt-greg;

$dt-coptic .= new(year => 1741, month => 3, day => 5, daypart => after-sunset());
$dt-greg    = $dt-coptic.to-date;
say $dt-greg.gist;   # --> 2024-11-13

# on the other hand
$dt-coptic .= new(year => 1741, month => 3, day => 5, daypart => before-sunrise());
$dt-greg    = $dt-coptic.to-date;
say $dt-greg.gist;   # --> 2024-11-14

$dt-coptic .= new(year => 1741, month => 3, day => 5, daypart => daylight());
$dt-greg    = $dt-coptic.to-date;
say $dt-greg.gist;   # --> 2024-11-14

DESCRIPTION

Date::Calendar::Coptic is a class implementing the Coptic calendar. This calendar derives from the ancient Egyptian calendar. A year consists of 12 months with 30 days each, plus 5 or 6 additional days (epagomene) at the end of the year. Leap years occurs every fourth year, with no adjustment for century years. The calendar also define weeks which last for 7 days, beginning on sunday and ending on saturday.

See the full documentation in the Date::Calendar::CopticEthiopic role.

AUTHOR

Jean Forget <J2N-FORGET at orange dot fr>

COPYRIGHT AND LICENSE

Copyright (c) 2019, 2020, 2024, 2025 Jean Forget

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

Date::Calendar::CopticEthiopic v0.1.1

conversions from / to the Coptic calendar and from / to the Ethiopic calendar

Authors

  • Jean Forget

License

Artistic-2.0

Dependencies

Date::Calendar::Strftime

Test Dependencies

Provides

  • Date::Calendar::Coptic
  • Date::Calendar::Coptic::Names
  • Date::Calendar::CopticEthiopic
  • Date::Calendar::Ethiopic
  • Date::Calendar::Ethiopic::Names

Documentation

The Camelia image is copyright 2009 by Larry Wall. "Raku" is a trademark of the Yet Another Society. All rights reserved.

Built with Podlite — the markup and publishing tools behind this site.