Thelemic Time Server v2 BETA
Do what thou wilt shall be the whole of the Law.
The purpose of this time service is to provide a relatively
easy means of including the Thelemic date into HTML content as
plain text rather than images. Unlike images, text can be
styled with CSS, flows more evenly with the surrounding
content, and can be scaled and transformed in numerous ways. However,
for those who prefer images we've enabled PNG format too. Simply use
format=png as an attribute and you will get PNG result.
To include the current Thelemic date, the simplest usage of
this API is:
<span class="date93"></span>
...
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script src="http://date.lashtal.com/eralegis.js"></script>
In order to load latest JQuery visit Google Hosted Libraries.
The "date93" class triggers the functionality. The
element could be a <span>, <div>, <p>, or many
other elements so long as they are assigned that class. The
style of the date output as well as the time zone or using a
date other than the present can be controlled by setting
attributes to this element. This is best described with a few
examples, the markup followed by the stylized output.
Examples
<span data-evdate="2012-12-09 05:35:00"
class="date93"></span>
☉ in 17° Sagittarii : ☽ in 20° Librae : dies Solis : Anno ⅠⅤⅹⅹ æræ legis
<span data-evdate="2012-12-09 05:35:00"
data-tz="US/Pacific"
class="date93"></span>
☉ in 17° Sagittarii : ☽ in 20° Librae : dies Saturni : Anno ⅠⅤⅹⅹ æræ legis
<span data-evdate="2012-12-09 05:35:00"
data-show-deg="0"
class="date93"></span>
☉ in Sagittario : ☽ in Libra : dies Solis : Anno ⅠⅤⅹⅹ æræ legis
<span data-evdate="2012-12-09 05:35:00"
data-lang="symbol"
class="date93"></span>
☉ in 17° ♐ : ☽ in 20° ♎ : ☉ : ⅠⅤⅹⅹ
<span data-evdate="2012-12-09 05:35:00"
class="date93" data-show-deg="0"
data-show-dow="0" data-show-year="0"
data-show-terse="1"
data-lang="symbol"></span>
☉ ♐ : ☽ ♎
If the standard attribute flags don't provide enough
configurability, the output can be run through a custom
template:
<span data-evdate="2012-12-09 05:35:00"
class="date93" data-lang="english">Sol
in {ssign}, Luna in {lsign}, {dow}</span>
Sol in Sagittarius, Luna in Libra, Sunday
<span data-evdate="2012-12-09 05:35:00"
class="date93" data-lang="symbol">Our Lord
and Father the Sun in {sdeg}° {ssign}, year {year1}:{year2}</span>
Our Lord and Father the Sun in 17° ♐, year ⅠⅤ:ⅹⅹ
The template variables are
ssign
,
sdeg
,
lsign
,
ldeg
,
dow
,
year1
,
year2
.
Attributes
General attributes:
- data-evdate
- A date or timestamp in ISO8601 format
(e.g.
YYYY-MM-DD HH:MM:SS
). Defaults to now.
- data-lang
- One of
latin
(default), english
, symbol
, or poor-latin
.
- data-tz
- Appropriate time zone values are TZ values from the
IANA zoneinfo
database
(common list here).
Only used for day-of-week calculation. Defaults to UTC.
- data-roman-year
- Render year values in Roman numerals. Defaults to 1. Set
to 0 for Arabic.
Attributes which alter the default template:
- data-show-terse
- Render the "in" in "Sol in
Pisces". Defaults to 0.
- data-show-deg
- Render the numeric degree value and degree
symbol. Defaults to 1.
- data-show-dow
- Render the day of the week. Defaults to 1.
- data-show-year
- Render the year. Defaults to 1.
Other notes
-
The server side of this service is a
small Mojolicious
application built around the
DateTime::Format::EraLegis Perl module. Also
available on GitHub.
-
Override the default EraLegis server URL by setting
eralegis.base_url immediately after the loading the
script.
-
Missing or garbled symbols in the rendered dates are
almost certainly the result of the font in use having no
sigils for the corresponding Unicode code points. In
particular, fonts frequently lack the zodiacal symbols. If
you run into this try using another font or possibly use
CSS to switch to another font for just those
characters. Suggestions for more elegant and robust
solutions to this problem are welcome.
Love is the law, love under will.
Copyright for Aerae Legis © 2012. Clay Fouts
Copyright © 2012. LAShTAL