DateTime::Format::EraLegis - DateTime converter for Era Legis DateTime::Format::EraLegis::Ephem - planetary ephemeris role DateTime::Format::EraLegis::Ephem::DBI - default ephemeris getter DateTime::Format::EraLegis::Style - customize output styles
use DateTime::Format::EraLegis; my $ephem = DateTime::Format::EraLegis::Ephem::DBI->new( ephem_db => 'db.sqlite3'); my $style = DateTime::Format::EraLegis::Style->new( show_terse => 1, lang => 'symbol'); my $dtf = DateTime::Format::EraLegis->new( ephem => $ephem, style => $style); my $dt->set_formatter($dtf);
These three modules combined enable DateTime objects to emit date strings formatted according to the Thelemic calendar. The ephemeris provides access to the planetary location of the Sun and Moon keyed by UTC timestamp. The style dictates the specific expression of the of datetime value using a template into which one can place tokens which can be converted into the sign/degree coordinates for the given date. A default style exists and is permutable by boolean attributes.
All three classes are built with Moose and behave accordingly. Method arguments are typechecked and will die on failure. Defaults exist for all attributes. All attributes are read-only and must be assigned at the time of instantiation.
"Sol in {sdeg} degrees {ssign}, anno {year1}{year2} era legis"
Interpolated values get assigned based on the setting of 'lang'.
The schema for the DBI ephemeris table is very simple and the querying SQL very generic. Most DBI backends should work without issue, though SQLite3 is the only one tested. The schema is:
CREATE TABLE ephem ( body TEXT, -- one of 'sol' or 'luna' time DATETIME, -- UTC timestamp of shift into degree degree INTEGER NOT NULL, -- degrees from 0 degrees Aries PRIMARY KEY (body, time) );
Please report bugs via GitHub issues: https://github.com/ctfliblime/DateTime-Format-EraLegis
Clay Fouts <cfouts@khephera.net>
Copyright (c) 2012 Clay Fouts
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.