last revisions: 11-7-2001
This document contains draft segments of two other documents. It is does not in itself comprise a complete document nor specification. This document is posted to solicit feedback on the changes under consideration herein.
The 0.2 version of the calendar conversion utilities that are a part of
libeth will feature an extensively reworked version of the estrftime
function.
The new version will handle locale support by making preemptive interpretation of the extended
conversion specifiers of
standard strftime.
The following table illustrates the interpretations proposed:
Field | Interpretation |
---|---|
%Ec | is not interpreted. |
%EC |
is replaced by is replaced by is ignored for the year 0 |
%Ex | is not interpreted. |
%EX | is not interpreted. |
%Ey | is replaced by the year in the Ethiopic calendar and represented with western numerals. |
%EY | is replaced by the year in the Ethiopic calendar and represented with Ethiopic numerals. |
%Od | is replaced by day of the month with Ethiopic numerals, filled in as needed with leading spaces. |
%Oe | is replaced by day of the month with Ethiopic numerals, filled in as needed with leading spaces. |
%OH | is replaced by the hour (24-hour clock) using the -6 hour convention. |
%OI | is replaced by the hour (12-hour clock) using the -6 hour convention. |
%Om | is replaced by the month using Ethiopic numerals. |
is not interpreted. | |
%OS | is not interpreted. |
%Ou | is replaced by the weekday as an Ethiopic number (Monday= |
%OU | is replaced by the week number of the year (Sunday as the first day of the week, rules correspond to %V) in Ethiopic numerals. |
%OV | is replaced by the week number of the year (Monday as the first day of the week, rules correspond to %V) in Ethiopic numerals. |
%Ow | is replaced by the number of the weekday (Sunday=0) using Ethiopic numerals. |
is replaced by the week number of the year (Monday as the first day of the week) using Ethiopic numerals. | |
%Oy | is replaced by the year (offset from %C) using Ethiopic numerals. |
The conversion specifiers require only conversion between numeral systems in most cases. %Om and %Oy specify a change of numerals systems and do not require priori conversion into the Ethiopian calendar system. To force dates into an Ethiopic context the 0.2 interpreter will recognize hyphen, '-', which will force a date conversion before the token replacement. Dates already in the Ethiopic context will be left unmodified and not converted into the Western system. Recognized - extensions will be:
%-b | is replaced by the locale's abbreviated month name in the Ethiopian calendar system. |
---|---|
%-B | is replaced by the locale's full month name in the Ethiopian calendar system. |
%-m | is replaced by the month using Ethiopic numerals in the Ethiopian calendar system. |
%-Om | is replaced by the month using Ethiopic numerals in the Ethiopian calendar system. |
%-Oy | is replaced by the year (offset from %C) using Ethiopic numerals in the Ethiopian calendar system. |
Additional specifiers are defined for properties of Ethiopic dates believed to be useful for calendar programming:
%-q | Day name modifier ( |
---|---|
%-ta | Name of tabot |
%-ts | Name of current (inner most) tsom (if any) |
%-tsm | Name of current (outer most) tsom (if any) |
%-EN | name of era ( |
%-ms | Name of star for the current month. |
%-ys | Name of star for the current year. |
%-sds | Name of star for the current day (Sidamo). |
%-sdm | Name of star for the current market day (Sidamo). |
The date
conversion attribute is analogous to the
day
, month
and year
CGI parameters of
Subsection 3.4. The difference in using a single
"date
" attribute is that the day
, month
and year
attribute values are grouped in a comma separated list
to form the "date
" attribute value. The calendar system of the
date numeric values may be included as the last item of the list. The calendar
system of the date
attribute alternatively be indicated with a
"calIn
" attribute, the first form however is the preferred:
<LIVEGEEZ date="DATE"> <LIVEGEEZ date="DATE" lang="LANG"> <LIVEGEEZ date="DATE" lang="LANG" calOut="CALSYS"> <LIVEGEEZ date="DATE" lang="LANG" calOut="CALSYS" format="FORMAT"> <LIVEGEEZ date="DATE" lang="LANG" calOut="CALSYS" prop="PROPERTY"> <LIVEGEEZ date="DATE" lang="LANG" calOut="CALSYS" (format="FORMAT" | prop="PROPERTY") name="NAME"> DATE := "today" | day "," month "," year | day "," month "," year "," CALSYS ; day, month, and year tokens were defined in Table 3.3.1 ; CALSYS here corresponds to the calIn parameter. ; Ethiopic calendar is assumed when CALSYS is omitted. FORMAT := <a valid estrftime format> ; PROP := "day" | "eday" | "eyear" | "day-name" | "month" | "month-name" | "holiday" | "year" | "eyear" | "year-name" | "tsom" | "tsom-minor" | "tsom-major" | "tabot" | "month-star" | "year-star" | "sid-star-day" | "sid-market-day" ; NAME := [A-Za-z0-9]+ ;
The "name
" attribute is another new introduction. The
name
attribute allows us to make future references to a
LiveGe'ez date declaration. This is convenient for calendrical scripting
as we do not have to respecify the date
parameter and other
initial attributes each time the same date is to be used. After the
initial declaration, modifications made to a named date (such as a
lang
or calOut
settings) will remain for future
use.
The "prop" attribute is a shortcut to composing a date format where the
specifiers can be difficult to remember. Likewise the "prop
" and
"format
" attributes can not be used together.
The "prop
" attribute may be thought of as invoking a method on a
date object. For example: <LIVEGEEZ date="29,4,1991,et" name="day1">
instantiates a date object named "day1". Then
<LIVEGEEZ name="day1" lang="gez" prop="day-name">
would be equivalent to day1.day_name( "gez" )
which would print
the weekday name for 29/4/1991 in the Ethiopic calendar system in the Ge'ez
language.
day | Equivalent to "%d". |
---|---|
eday | Equivalent to "%Ou". |
day-name | Equivalent to "%A". |
month | Equivalent to "%m". |
month-name | Equivalent to "%B". |
year | Equivalent to "%y". |
eyear | Equivalent to "%EY". |
year-name | Equivalent to "%EN". |
tabot | Equivalent to "%-ta". |
tsom tsom-minor |
Equivalent to "%-ts". |
tsom-major | Equivalent to "%-tsm". |
month-star | Equivalent to "%-ms". |
year-star | Equivalent to "%-ys". |
sid-star-day | Equivalent to "%-sds". |
sid-market-day | Equivalent to "%-sdm". |
|