Clay Fouts > DateTime-Format-EraLegis-0.003 > DateTime::Format::EraLegis

Download:
DateTime-Format-EraLegis-0.003.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Module Version: 0.003   Source   Latest Release: DateTime-Format-EraLegis-0.006

NAME ^

DateTime::Format::EraLegis - DateTime converter for Era Legis DateTime::Format::EraLegis::Ephem - planetary ephemeris data DateTime::Format::EraLegis::Style - customize output styles

SYNOPSIS ^

 use DateTime::Format::EraLegis;

 my $ephem = DateTime::Format::EraLegis::Ephem->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);

DESCRIPTION ^

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.

ATTRIBUTES AND METHODS ^

DATABASE SCHEMA ^

The schema is very simple and the querying SQL very generic. Most DBI backends should work without issue, though SQLite3 is the only tested one. 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)
 );

BUGS ^

Please report bugs via GitHub issues: https://github.com/ctfliblime/DateTime-Format-EraLegis

AUTHOR ^

Clay Fouts <cfouts@khephera.net>

COPYRIGHT & LICENSE ^

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.

syntax highlighting: