MYSTlore:Date input

From MYSTlore

(Redirected from MYSTlore:Years and hahrtee)
Jump to: navigation, search

↑ Return to Guide


Since many historical accounts are naturally filled with dates, a uniform notation has been established for years and hahrtee that simultaneously saves the editor some time and adds some convenience to the visitor.

Contents

[edit] Usage for Years and Hahrtee

MYSTlore currently provides three related extension tags: <hahr>, <hahrtee> and <year> (but, at this point, not <years>). They are used like so:

  • For a single hahr, <hahr>4817</hahr>.
  • For a range of two hahrtee, given its start and end, <hahrtee>2348-2495</hahrtee>.
  • For a single year, <year>1997</year>.

MYSTlore will display those as follows:

Notice how it automatically does the following:

  • It appends the appropriate year and hahr suffixes, such as DE for a hahr since 0, BC for a year before 0, and AD for a year since 0.
  • It converts the hahr to the equivalent year, the range of hahrtee to the corresponding range of years, and the year to the respective hahr.
  • For the given hahr or hahrtee, it provides appropriate links that may describe them in more detail, particular with regard to further significant events around the same time.

The <hahr> tag offers the two attributes suffixes and label for further customization:

  • suffixes can be set to one of none, hahr, year or both (the default) to set which of the suffixes (DE, BC or AD) should be appended.
  • label overrides the display of the actual hahr (as well as its suffix) with a custom text. For instance, it may sometimes be useful to present a text of "the following year" or "three years later", instead of the default. This can be done like <hahr label="three years later">6731</hahr>, which becomes three years later (925 BC).

To input a hahr before 0 DE (i.e. one suffixed BE), prefix a minus sign (-), as you would with negative numbers.

[edit] Timeline table style

As demonstrated on Timeline, <hahr> supports a style attribute which can take "timeline-table" as its value. This works best in conjunction with MediaWiki's tables. For example, this:

{| class="zebra-table" cellspacing="0" style="width: 100%;"
|-
|class="timeline-table-hahr"|<hahr style="timeline-table">-207</hahr> || [[Ri'neref]] is born on [[Garternay]].
|-
|class="timeline-table-hahr"|<hahr style="timeline-table">-202</hahr> || [[Ri'neref]] does stuff.
|}

will produce this output:

207 BE7863 BC Ri'neref is born on Garternay.
202 BE7858 BC Ri'neref does stuff.

The attribute circa with a value of "true" will prepend a "c.", like this:

c. 73 BE7729 BC Ri'neref is leaves from the Guild of Writers.


[edit] Known limitations

  • The conversion currently does not account for leap seconds.
  • As stated above, ranges of years are currently not supported.
  • Neither are complex ranges, such as "1-3,5,8-11".
  • You cannot input years before 0 AD, only hahrtee before 0 DE. While a sufficiently early hahr will automatically get converted to the respective year BC, the opposite is not possible.

[edit] Usage for dates

The date extension tag allows you to input dates using the ISO 8601 (Wikipedia) format, e.g. 2007-11-23 for November 23, 2007. By default, the preceding is the default format it will display the result in, and it does so in both surface as well as D'ni dates (i.e., it implicitly converts).

A format attribute allows you to customize the output. The syntax used for this is based on that of the PHP date function, though currently, not all format characters are supported.

Where not needed, you can also omit the day, or even the day and month. Notice that you will have to customize the format string in such a case not to try and display a day and/or month.

A few examples:

  • <date>2007-11-23</date> turns to November 23, 2007 (Leevofo 27, 9663),
  • <date format="F Y">2007-11</date> turns to November 2007 (Leevofo 9663), and
  • <date format="F d">2007-11-23</date> turns to November 23 (Leevofo 27).

[edit] Known issues

  • Due to limitations in the way MediaWiki (Wikipedia) handles them, combining these extension tags with templates is very likely to cause problems.
Personal tools