LocalTime

From translatewiki.net
Jump to: navigation, search

This is an idea for having internationalized and localized time expressions in Mediawiki. Currently it only covers relative time expressions, but we also have plans for absolute time expressions. Note, that we can already generate absolute time expressions (for example: 1. January 2011), but not parse them.

The syntax below is designed such that we can both generate and parse time expressions. Use cases would for example include giving durations of blocks. See also bugzilla:19412

Syntax

The definition is a three level tree structure, currently given in a YAML format:

  • type of expression
    • magnitude
      • patterns

Type of expression can be:

  1. duration (ex: 5 days)
    1. how long something takes/has taken/will take
  2. interval-past (ex: yesterday, 6 weeks ago)
    1. how much time ago something happened
  3. duration-future (ex: after 2 hours)
    1. when something happens at earliest

Magnitude can be:

  1. seconds
  2. minutes
  3. hours
  4. days
  5. weeks
  6. months
  7. years
  8. decades
  9. centuries
  10. millennia

Patterns are of form condition: expression.

Conditions are of form if # is N and if INDEX(#) is N, where # is the number in the expression, which is compared against plain number N, or the index of convertPlural function if INDEX(#). INDEX(#) is same as {{PLURAL:#|0|1|2|3|4|...}}

Expressions are strings where # is replaced with a formatted number. When the number # can match multiple conditions, the first matching condition is used when generating expression. When parsing all expressions that match any condition are accepted.


Examples

English

interval-past:
  SECONDS:
   - "if # is 1:          second ago"
   - "if INDEX(#) is 0: # second ago"
   - "if INDEX(#) is 1: # seconds ago"
  MINUTES:
   - "if # is 1:          minute ago"
   - "if INDEX(#) is 0: # minute ago"
   - "if INDEX(#) is 1: # minutes ago"
  HOURS:
   - "if # is 1:          hour ago"
   - "if INDEX(#) is 0: # hour ago"
   - "if INDEX(#) is 1: # hours ago"
  DAYS:
   - "if # is 1:          yesterday"
   - "if INDEX(#) is 0: # day ago"
   - "if INDEX(#) is 1: # days ago"
  WEEKS:
   - "if # is 1:          week ago"
   - "if INDEX(#) is 0: # week ago"
   - "if INDEX(#) is 1: # weeks ago"
  MONTHS:
   - "if # is 1:          month ago"
   - "if INDEX(#) is 0: # month ago"
   - "if INDEX(#) is 1: # months ago"
  YEARS:
   - "if # is 1:          year ago"
   - "if INDEX(#) is 0: # year ago"
   - "if INDEX(#) is 1: # years ago"
  DECADES:
   - "if # is 1:          decade ago"
   - "if INDEX(#) is 0: # decade ago"
   - "if INDEX(#) is 1: # decades ago"
  CENTURIES:
   - "if # is 1:          century ago"
   - "if INDEX(#) is 0: # century ago"
   - "if INDEX(#) is 1: # centuries ago"
  MILLENNIA:
   - "if # is 1:          millenium ago"
   - "if INDEX(#) is 0: # millenium ago"
   - "if INDEX(#) is 1: # millennia ago"

interval-future:
  DAYS:
   - "if # is 1: tomorrow"
   - "if INDEX(#) is 0: after # day"
   - "if INDEX(#) is 1: after # days"

duration:
  DAYS:
   - "if INDEX(#) is 0: # day"
   - "if INDEX(#) is 1: # days"

Dutch

interval-past:
  SECONDS:
   - "if # is 1:          seconde geleden"
   - "if INDEX(#) is 0: # seconden geleden"
   - "if INDEX(#) is 1: # seconden geleden"
  MINUTES:
   - "if # is 1:          minuut geleden"
   - "if INDEX(#) is 0: # minuut geleden"
   - "if INDEX(#) is 1: # minuten geleden"
  HOURS:
   - "if # is 1:          uur geleden"
   - "if INDEX(#) is 0: # uur geleden"
   - "if INDEX(#) is 1: # uur geleden"
  DAYS:
   - "if # is 1:          gisteren"
   - "if # is 2:          eergisteren"
   - "if INDEX(#) is 0: # dag geleden"
   - "if INDEX(#) is 1: # dagen geleden"
  WEEKS:
   - "if # is 1:          vorige week"
   - "if INDEX(#) is 0: # week geleden"
   - "if INDEX(#) is 1: # weken geleden"
  MONTHS:
   - "if # is 1:          vorige maand"
   - "if INDEX(#) is 0: # maand geleden"
   - "if INDEX(#) is 1: # maanden geleden"
  YEARS:
   - "if # is 1:          vorig jaar"
   - "if INDEX(#) is 0: # jaar geleden"
   - "if INDEX(#) is 1: # jaar geleden"
  DECADES:
   - "if # is 1:          vorig decennium"
   - "if INDEX(#) is 0: # decennium geleden"
   - "if INDEX(#) is 1: # decennia geleden"
  CENTURIES:
   - "if # is 1:          vorige eeuw"
   - "if INDEX(#) is 0: # eeuw geleden"
   - "if INDEX(#) is 1: # eeuwen geleden"
  MILLENNIA:
   - "if # is 1:          vorige millenium"
   - "if INDEX(#) is 0: # millenium geleden"
   - "if INDEX(#) is 1: # millennia geleden"

interval-future:
  DAYS:
   - "if # is 1: morgen"
   - "if # is 2: overmorgen"
   - "if INDEX(#) is 0: over # dag"
   - "if INDEX(#) is 1: over # dagen"

duration:
  DAYS:
   - "if INDEX(#) is 0: # dag"
   - "if INDEX(#) is 1: # dagen"

Finnish

interval-past:
  SECONDS:
   - "if INDEX(#) is 0: # sekunti sitten"
   - "if INDEX(#) is 1: # sekuntia sitten"
  MINUTES:
   - "if INDEX(#) is 0: # minuutti sitten"
   - "if INDEX(#) is 1: # minuuttia sitten"
  HOURS:
   - "if INDEX(#) is 0: # tunti sitten"
   - "if INDEX(#) is 1: # tuntia sitten"
  DAYS:
   - "if # is 1:        eilen"
   - "if # is 2:        toissapäivänä"
   - "if INDEX(#) is 0: # päivä sitten"
   - "if INDEX(#) is 1: # päivää sitten"
  WEEKS:
   - "if # is 1:        viikko sitten"
   - "if INDEX(#) is 0: # viikko sitten"
   - "if INDEX(#) is 1: # viikkoa sitten"
  MONTHS:
   - "if # is 1:        kuukausi sitten"
   - "if INDEX(#) is 0: # kuukausi sitten"
   - "if INDEX(#) is 1: # kuukautta sitten"
  YEARS:
   - "if # is 1:        vuosi sitten"
   - "if INDEX(#) is 0: # vuosi sitten"
   - "if INDEX(#) is 1: # vuotta sitten"
  DECADES:
   - "if # is 1:        vuosikymmen sitten"
   - "if INDEX(#) is 0: # vuosikymmen sitten"
   - "if INDEX(#) is 1: # vuosikymmentä sitten"
  CENTURIES:
   - "if # is 1:        vuosisata sitten"
   - "if INDEX(#) is 0: # vuosisata sitten"
   - "if INDEX(#) is 1: # vuosisataa sitten"
  MILLENNIA:
   - "if # is 1:        vuosituhat sitten"
   - "if INDEX(#) is 0: # vuosituhat sitten"
   - "if INDEX(#) is 1: # vuosituhatta sitten"

interval-future:
  SECONDS:
   - "if # is 1: sekunnin kuluttua"
   - "if # is 1: sekunnin päästä"
   - "if true:   # sekunnin kuluttua"
   - "if true:   # sekunnin päästä"
  MINUTES:
   - "if # is 1: minuutin kuluttua"
   - "if # is 1: minuutin päästä"
   - "if true:   # minuutin kuluttua"
   - "if true:   # minuutin päästä"
  HOURS:
   - "if # is 1: tunnin kuluttua"
   - "if # is 1: tunnin päästä"
   - "if true:   # tunnin kuluttua"
   - "if true:   # tunnin päästä"
  DAYS:
   - "if # is 1: huomenna"
   - "if # is 2: ylihuomenna"
   - "if # is 1: päivän kuluttua"
   - "if # is 1: päivän päästä"
   - "if true:   # päivän kuluttua"
   - "if true:   # päivän päästä"
  WEEKS:
   - "if # is 1: viikon kuluttua"
   - "if # is 1: viikon päästä"
   - "if true:   # viikon kuluttua"
   - "if true:   # viikon päästä"
  MONTHS:
   - "if # is 1: kuukauden kuluttua"
   - "if # is 1: kuukauden päästä"
   - "if true:   # kuukauden kuluttua"
   - "if true:   # kuukauden päästä"
  YEARS:
   - "if # is 1: vuoden kuluttua"
   - "if # is 1: vuoden päästä"
   - "if true:   # vuoden kuluttua"
   - "if true:   # vuoden päästä"
  DECADES:
   - "if # is 1: vuosikymmenen kuluttua"
   - "if # is 1: vuosikymmenen päästä"
   - "if true:   # vuosikymmenen kuluttua"
   - "if true:   # vuosikymmenen päästä"
  CENTURIES:
   - "if # is 1: vuosisadan kuluttua"
   - "if # is 1: vuosisadan päästä"
   - "if true:   # vuosisadan kuluttua"
   - "if true:   # vuosisadan päästä"
  MILLENNIA:
   - "if # is 1: vuosituhannen kuluttua"
   - "if # is 1: vuosituhannen päästä"
   - "if true:   # vuosituhannen kuluttua"
   - "if true:   # vuosituhannen päästä"

duration:
  SECONDS:
   - "if # is 1:        sekunti"
   - "if INDEX(#) is 0: # sekunti"
   - "if INDEX(#) is 1: # sekuntia"
  MINUTES:
   - "if # is 1:        minuutti"
   - "if INDEX(#) is 0: # minuutti"
   - "if INDEX(#) is 1: # minuuttia"
  HOURS:
   - "if # is 1:        tunti"
   - "if INDEX(#) is 0: # tunti"
   - "if INDEX(#) is 1: # tuntia"
  DAYS:
   - "if # is 1:        päivä"
   - "if INDEX(#) is 0: # päivä"
   - "if INDEX(#) is 1: # päivää"
  WEEKS:
   - "if # is 1:        viikko"
   - "if INDEX(#) is 0: # viikko"
   - "if INDEX(#) is 1: # viikkoa"
  MONTHS:
   - "if # is 1:        kuukausi"
   - "if INDEX(#) is 0: # kuukausi"
   - "if INDEX(#) is 1: # kuukautta"
  YEARS:
   - "if # is 1:        vuosi"
   - "if INDEX(#) is 0: # vuosi"
   - "if INDEX(#) is 1: # vuotta"
  DECADES:
   - "if # is 1:        vuosikymmen"
   - "if INDEX(#) is 0: # vuosikymmen"
   - "if INDEX(#) is 1: # vuosikymmentä"
  CENTURIES:
   - "if # is 1:        vuosisata"
   - "if INDEX(#) is 0: # vuosisata"
   - "if INDEX(#) is 1: # vuosisataa"
  MILLENNIA:
   - "if # is 1:        vuosituhat"
   - "if INDEX(#) is 0: # vuosituhat"
   - "if INDEX(#) is 1: # vuosituhatta"


Ripuarian / Colognian

interval-past:
  SECONDS:
   - "if # is 0:   vör kein Sekund"
   - "if # is 1:   vör en Sekund"           // unstressed, unfocussed, circa
   - "if # is 1:   vör ein Sekund"          // stressed, focussed, exact
   - "if # is N:   vör # Sekunde"
  MINUTES:
   - "if # is 0:   vör kein Menutt"
   - "if # is 1:   vör en Menutt"           // unstressed, unfocussed, circa
   - "if # is 1:   vör ein Menutt"          // stressed, focussed, exact
   - "if # is N:   vör # Menutte"
  HOURS:
   - "if # is 0:   vör nit ens en Shtund"
   - "if # is 1:   vör en Shtund"           // unstressed, unfocussed, circa
   - "if # is 1:   vör ein Shtund"          // stressed, focussed, exact
   - "if # is N:   vör # Shtunde"
  DAYS:
   - "if # is 0:   vör nit ens enem Daach"
   - "if # is 1:   vör enem Daach"          // unstressed, unfocussed, circa
   - "if # is 1:   vör einem Daach"         // stressed, focussed, exact
   - "if # is N:   vör # Dääsch"            // use depending on rhythmic context in a sentence and dialect
   - "if # is N:   vör # Daare"             // use depending on rhythmic context in a sentence and dialect
  WEEKS:
   - "if # is 0:   vör kein Woch"
   - "if # is 0:   vör nit ens en Woch"
   - "if # is 1:   vör ener Woch"           // unstressed, unfocussed, circa
   - "if # is 1:   vör ein Woch"            // stressed, focussed, exact
   - "if # is N:   vör # Woche"
  MONTHS:
   - "if # is 0:   vör keinem Mohnd"
   - "if # is 0:   et es keine Mohnd her, dat ..."
   - "if # is 0:   vör nit ens enem Mohnd"
   - "if # is 1:   vör enem Mohnd"          // unstressed, unfocussed, circa
   - "if # is 1:   vör einem Mohnd"         // stressed, focussed, exact
   - "if # is N:   vör # Mohnd"             // use depending on rhythmic context in a sentence and dialect
   - "if # is N:   vör # Mohnde"            // use depending on rhythmic context in a sentence and dialect
  YEARS:
   - "if # is 0:   vör keinem Johr"
   - "if # is 0:   et es kei Johr her, dat ..."
   - "if # is 0:   vör nit ens enem Johr"
   - "if # is 1:   vör enem Johr"           // unstressed, unfocussed, circa
   - "if # is 1:   vör einem Johr"          // stressed, focussed, exact
   - "if # is N:   vör # Johr"              // use depends on rhythmic context in a sentence and dialect
   - "if # is N:   vör # Johre"             // use depends on rhythmic context in a sentence and dialect
  DECADES:                                  // hardly used. Choose YEARS: with # times 10 instead
   - "if # is 0:   vör nit ens enem Johrzehnt"
   - "if # is 0:   et es kei Johrzehnt her, dat"
  CENTURIES:
   - "if # is 0:   vör nit ens enem Johondert"
   - "if # is 0:   et es kei Johondert her, dat ..."
   - "if # is 1:   vör enem Johondert"      // unstressed, unfocussed, circa
   - "if # is 1:   vör einem Johondert"     // stressed, focussed, exact
   - "if # is N:   vör #hondert Johr"       // # spelled out, usually the better choice for non-tabular data
   - "if # is N:   vör #hondert Johre"      // # spelled out, usually the better choice for non-tabular data
   - "if # is N:   vör #00 Johr"            // otherwise
   - "if # is N:   vör #00 Johre"           // otherwise
  MILLENNIA:
   - "if # is 0:   vör nit ens enem Johdousend"
   - "if # is 0:   et es kei Johdousend her, dat ..."
   - "if # is 1:   vör enem Johdousend"     // unstressed, unfocussed, circa
   - "if # is 1:   vör einem Johdousend"    // stressed, focussed, exact
   - "if # is N:   vör #dousend Johr"       // # spelled out, usually the better choice for non-tabular data
   - "if # is N:   vör #dousend Johre"      // # spelled out, usually the better choice for non-tabular data
   - "if # is N:   vör #000 Johr"           // otherwise
   - "if # is N:   vör #000 Johre"          // otherwise

interval-future
  SECONDS:
   - "if # is 0:   en keine Sekund"
   - "if # is 0:   en nit ens ene Sekund"          // expresses a value below one rounded to zero
   - "if # is 0:   en 0 Sekunde"
   - "if # is 1:   en en Sekund"                   // unstressed, unfocussed, circa
   - "if # is 1:   en ein Sekund"                  // stressed, focussed, exact
   - "if # is 1:   en 1 Sekund"
   - "if # is N:   en # Sekunde"
  MINUTES:
   - "if # is 0:   en keine Menutt"
   - "if # is 0:   en nit ens ene Menutt"          // expresses a value below one rounded to zero
   - "if # is 0:   en 0 Menutte"
   - "if # is 1:   en en Menutt"                   // unstressed, unfocussed, circa
   - "if # is 1:   en eine Menutt"                 // stressed, focussed, exact
   - "if # is 1:   en 1 Menutt"
   - "if # is N:   en # Menutte"
  HOURS:
   - "if # is 0:   en keine Shtund"
   - "if # is 0:   en nit ens ene Shtund"          // expresses a value below one rounded to zero
   - "if # is 0:   en 0 Shtunde"
   - "if # is 1:   en en Shtund"                   // unstressed, unfocussed, circa
   - "if # is 1:   en eine Shtund"                 // stressed, focussed, exact
   - "if # is 1:   en 1 Shtund"
   - "if # is N:   en # Shtunde"
  DAYS:
   - "if # is 0:   en keinem Daach"
   - "if # is 0:   en nit ens enem Daach"          // expresses a value below one rounded to zero
   - "if # is 0:   en 0 Dääsch"                    // use depending on rhythmic context in a sentence and dialect, preferred
   - "if # is 0:   en 0 Daare"                     // use depending on rhythmic context in a sentence and dialect
   - "if # is 1:   en enem Daach"                  // unstressed, unfocussed, circa
   - "if # is 1:   en einem Daach"                 // stressed, focussed, exact
   - "if # is 1:   en 1 Daach"
   - "if # is N:   en # Dääsch"                    // use depending on rhythmic context in a sentence and dialect
   - "if # is N:   en # Daare"                     // use depending on rhythmic context in a sentence and dialect
  WEEKS:
   - "if # is 0:   en kein Woch"
   - "if # is 0:   en nit ens en Woch"             // expresses a value below one rounded to zero
   - "if # is 0:   en 0 Woche"
   - "if # is 1:   en ene Woch"                    // unstressed, unfocussed, circa
   - "if # is 1:   en eine Woch"                   // stressed, focussed, exact
   - "if # is 1:   en 1 Woch"
   - "if # is N:   en # Woche"
  MONTHS:
   - "if # is 0:   en keinem Mohnd"
   - "if # is 0:   en nit ens enem Mohnd"          // expresses a value below one rounded to zero
   - "if # is 0:   en 0 Mohnde"
   - "if # is 1:   en enem Mohnd"                  // unstressed, unfocussed, circa
   - "if # is 1:   en einem Mohnd"                 // stressed, focussed, exact
   - "if # is 1:   en 1 Mohnd"
   - "if # is N:   en # Mohnd"                     // use depending on rhythmic context in a sentence and dialect
   - "if # is N:   en # Mohnde"                    // use depending on rhythmic context in a sentence and dialect
  YEARS:
   - "if # is 0:   en keinem Johr"
   - "if # is 0:   en nit ens einem Johr"          // expresses a value below one rounded to zero
   - "if # is 0:   en 0 Johre"                     // use depends on rhythmic context in a sentence and dialect
   - "if # is 1:   en enem Johr"                   // unstressed, unfocussed, circa
   - "if # is 1:   en einem Johr"                  // stressed, focussed, exact
   - "if # is 1:   en 1 Johr"
   - "if # is N:   en # Johr"                      // use depends on rhythmic context in a sentence and dialect
   - "if # is N:   en # Johre"                     // use depends on rhythmic context in a sentence and dialect
  DECADES:
   - "if # is 0:   en keinem Johrzehnt"
   - "if # is 0:   en nit ens einem Johrzehnt"     // expresses a value below one rounded to zero
   - "if # is 0:   en 0 Johrzehnte"
   - "if # is 1:   en enem Johrzehnt"              // unstressed, unfocussed, circa
   - "if # is 1:   en einem Johrzehnt"             // stressed, focussed, exact
   - "if # is 1:   en 1 Johrzehnt"
   - "if # is N:   en # Johrzehnte"
  CENTURIES:
   - "if # is 0:   en keinem Johondert"
   - "if # is 0:   en nit ens einem Johondert"     // expresses a value below one rounded to zero
   - "if # is 0:   en 0 Johonderte"
   - "if # is 1:   en enem Johondert"              // unstressed, unfocussed, circa
   - "if # is 1:   en einem Johondert"             // stressed, focussed, exact
   - "if # is 1:   en 1 Johondert"
   - "if # is N:   en # Johonderte"
  MILLENNIA:
   - "if # is 0:   en keinem Johdousend"
   - "if # is 0:   en nit ens einem Johdousend"    // expresses a value below one rounded to zero
   - "if # is 0:   en 0 Johdousende"
   - "if # is 1:   en enem Johdousend"             // unstressed, unfocussed, circa
   - "if # is 1:   en einem Johdousend"            // stressed, focussed, exact
   - "if # is 1:   en 1 Johdousend"
   - "if # is N:   en # Johdousende"

duration                                           // general note: both the words "för" and "lang" are optional where that is unabigous
  SECONDS:
   - "if # is 0:   för kein Sekund lang"
   - "if # is 0:   för nit ens en Sekund lang"     // expresses a value below one rounded to zero
   - "if # is 0:   för 0 Sekunde lang"
   - "if # is 1:   för en Sekund lang"             // unstressed, unfocussed, circa
   - "if # is 1:   för ein Sekund lang"            // stressed, focussed, exact
   - "if # is 1:   för 1 Sekund lang"
   - "if # is N:   för # Sekunde lang"
  MINUTES:
   - "if # is 0:   för kein Menutt lang"
   - "if # is 0:   för nit ens en Menutt lang"     // expresses a value below one rounded to zero
   - "if # is 0:   för 0 Menutte lang"
   - "if # is 1:   för en Menutt lang"             // unstressed, unfocussed, circa
   - "if # is 1:   för ein Menutt lang"            // stressed, focussed, exact
   - "if # is 1:   för 1 Menutt lang"
   - "if # is N:   för # Menutte lang"
  HOURS:
   - "if # is 0:   för kei Shtund lang"
   - "if # is 0:   för kein Shtund lang"           // usually preferred over "kei"
   - "if # is 0:   för nit ens en Shtund lang"     // expresses a value below one rounded to zero
   - "if # is 0:   för 0 Shtunde lang"
   - "if # is 1:   för en Shtund lang"             // unstressed, unfocussed, circa
   - "if # is 1:   för ein Shtund lang"            // stressed, focussed, exact
   - "if # is 1:   för 1 Shtund lang"
   - "if # is N:   för # Shtunde lang"
  DAYS:
   - "if # is 0:   för keine Daach lang"
   - "if # is 0:   för nit ens ene Daach lang"     // expresses a value below one rounded to zero
   - "if # is 0:   för 0 Dääsch lang"              // use depending on rhythmic context in a sentence and dialect
   - "if # is 0:   för 0 Daare lang"               // use depending on rhythmic context in a sentence and dialect
   - "if # is 1:   för ene Daach lang"             // unstressed, unfocussed, circa
   - "if # is 1:   för eine Daach lang"            // stressed, focussed, exact
   - "if # is 1:   för 1 Daach lang"
   - "if # is N:   för # Dääsch lang"              // use depending on rhythmic context in a sentence and dialect
   - "if # is N:   för # Daare lang"               // use depending on rhythmic context in a sentence and dialect
  WEEKS:
   - "if # is 0:   för kein Woch lang"
   - "if # is 0:   för nit ens en Woch lang"       // expresses a value below one rounded to zero
   - "if # is 0:   för 0 Woche lang"
   - "if # is 1:   för en Woch lang"               // unstressed, unfocussed, circa
   - "if # is 1:   för ein Woch lang"              // stressed, focussed, exact
   - "if # is 1:   för 1 Woch lang"
   - "if # is N:   för # Woche lang"
  MONTHS:
   - "if # is 0:   för keine Mohnd lang"
   - "if # is 0:   för nit ens ene Mohnd lang"     // expresses a value below one rounded to zero
   - "if # is 0:   för 0 Mohnd lang"               // use depending on rhythmic context in a sentence and dialect
   - "if # is 0:   för 0 Mohnde lang"              // use depending on rhythmic context in a sentence and dialect
   - "if # is 1:   för ene Mohnd lang"             // unstressed, unfocussed, circa
   - "if # is 1:   för eine Mohnd lang"            // stressed, focussed, exact
   - "if # is 1:   för 1 Mohnd lang"
   - "if # is N:   för # Mohnd lang"               // use depending on rhythmic context in a sentence and dialect
   - "if # is N:   för # Mohnde lang"              // use depending on rhythmic context in a sentence and dialect
  YEARS:
   - "if # is 0:   för kei Johr lang"
   - "if # is 0:   för nit ens e Johr lang"        // expresses a value below one rounded to zero
   - "if # is 0:   för 0 Johr lang"                // use depends on rhythmic context in a sentence and dialect
   - "if # is 0:   för 0 Johre lang"               // use depends on rhythmic context in a sentence and dialect
   - "if # is 1:   för e Johr lang"                // unstressed, unfocussed, circa
   - "if # is 1:   för ei Johr lang"               // stressed, focussed, exact
   - "if # is 1:   för 1 Johr lang"
   - "if # is N:   för # Johr lang"                // use depends on rhythmic context in a sentence and dialect
   - "if # is N:   för # Johre lang"               // use depends on rhythmic context in a sentence and dialect
  DECADES:
   - "if # is 0:   för kei Johrzehnt lang"
   - "if # is 0:   för nit ens e Johrzehnt lang"   // expresses a value below one rounded to zero
   - "if # is 0:   för 0 Johrzehnte lang"
   - "if # is 1:   för e Johrzehnt lang"           // unstressed, unfocussed, circa
   - "if # is 1:   för ei Johrzehnt lang"          // stressed, focussed, exact
   - "if # is 1:   för 1 Johrzehnt lang"
   - "if # is N:   för # Johrzehnte lang"
  CENTURIES:
   - "if # is 0:   för kei Johondert lang"
   - "if # is 0:   för nit ens e Johondert lang"   // expresses a value below one rounded to zero
   - "if # is 0:   för 0 Johonderte lang"
   - "if # is 1:   för e Johondert lang"           // unstressed, unfocussed, circa
   - "if # is 1:   för ei Johondert lang"          // stressed, focussed, exact
   - "if # is 1:   för 1 Johondert lang"
   - "if # is N:   för # Johonderte lang"
  MILLENNIA:
   - "if # is 0:   för kei Johdousend lang"
   - "if # is 0:   för nit ens e Johdousend lang"  // expresses a value below one rounded to zero
   - "if # is 0:   för 0 Johdousende lang"
   - "if # is 1:   för e Johdousend lang"          // unstressed, unfocussed, circa
   - "if # is 1:   för ei Johdousend lang"         // stressed, focussed, exact
   - "if # is 1:   för 1 Johdousend lang"
   - "if # is N:   för # Johdousende lang"

calendar-related-past:
  DAYS:
   - "if # is 0:   hück"
   - "if # is 1:   jestere"
   - "if # is 2:   vörjestere"
   - "if # is N:   vör # Dääsch"
   - "if # is N:   vör # Daare"
  WEEKS:
   - "if # is 0:   diß Woch"
   - "if # is 1:   läz Woch"
   - "if # is 2:   vörläz Woch"
   - "if # is 3:   vörvörläz Woch"
   - "if # is 4:   vörvörvörläz Woch"
   - "if # is 5:   vörvörvörvörläz Woch"
   - "if # is N:   vör # Woche"
  MONTHS:
   - "if # is 0:   dise Mohnd"
   - "if # is 1:   läzde Mohnd"
   - "if # is 2:   vörläzde Mohnd"
   - "if # is 3:   vörvörläzde Mohnd"
   - "if # is 4:   vörvörvörläzde Mohnd"
   - "if # is 5:   vörvörvörvörläzde Mohnd"
   - "if # is N:   vör # Mohnde"
  YEARS:
   - "if # is 0:   diß Johr"
   - "if # is 1:   läz Johr"
   - "if # is 2:   vörläz Johr"
   - "if # is 3:   vörvörläz Johr"
   - "if # is 4:   vörvörvörläz Johr"
   - "if # is 5:   vörvörvörvörläz Johr"
   - "if # is N:   vör # Johre"
  DECADES:
   - "if # is 0:   diß Johrzehnt"
   - "if # is 1:   läz Johrzehnt"
   - "if # is 2:   vörläz Johrzehnt"
   - "if # is 3:   vörvörläz Johrzehnt"
   - "if # is 4:   vörvörvörläz Johrzehnt"
   - "if # is 5:   vörvörvörvörläz Johrzehnt"
   - "if # is N:   vör # Johrzehnte"
  CENTURIES:
   - "if # is 0:   diß Johondert"
   - "if # is 1:   läz Johondert"
   - "if # is 2:   vörläz Johondert"
   - "if # is 3:   vörvörläz Johondert"
   - "if # is 4:   vörvörvörläz Johondert"
   - "if # is 5:   vörvörvörvörläz Johondert"
   - "if # is N:   vör # Johonderte"
  MILLENNIA:
   - "if # is 0:   diß Johdousend"
   - "if # is 1:   läz Johdousend"
   - "if # is 2:   vörläz Johdousend"
   - "if # is 3:   vörvörläz Johdousend"
   - "if # is 4:   vörvörvörläz Johdousend"
   - "if # is 5:   vörvörvörvörläz Johdousend"
   - "if # is N:   vör # Johdousende"

calendar-related-future:
  DAYS:
   - "if # is 0:   hück"
   - "if # is 1:   morje"
   - "if # is 2:   övvermorje"
   - "if # is 3:   övverövvermorje"
   - "if # is 4:   övverövverövvermorje"
   - "if # is 5:   övverövverövverövvermorje"
   - "if # is N:   vör # Dääsch"
   - "if # is N:   vör # Daare"
  WEEKS:
   - "if # is 0:   diß Woch"
   - "if # is 1:   näx Woch"
   - "if # is 2:   övvernäx Woch"
   - "if # is 3:   övverövvernäx Woch"
   - "if # is 4:   övverövverövvernäx Woch"
   - "if # is 5:   övverövverövverövvernäx Woch"
   - "if # is N:   vör # Woche"
  MONTHS:
   - "if # is 0:   dise Mohnd"
   - "if # is 1:   näx Mohnd"
   - "if # is 2:   övvernäxde Mohnd"
   - "if # is 3:   övverövvernäxde Mohnd"
   - "if # is 4:   övverövverövvernäxde Mohnd"
   - "if # is 5:   övverövverövverövvernäxde Mohnd"
   - "if # is N:   vör # Mohnde"
  YEARS:
   - "if # is 0:   diß Johr"
   - "if # is 1:   näx Johr"
   - "if # is 2:   övvernäx Johr"
   - "if # is 3:   övverövvernäx Johr"
   - "if # is 4:   övverövverövvernäx Johr"
   - "if # is 5:   övverövverövverövvernäx Johr"
   - "if # is N:   vör # Johre"
  DECADES:
   - "if # is 0:   diß Johrzehnt"
   - "if # is 1:   näx Johrzehnt"
   - "if # is 2:   övvernäx Johrzehnt"
   - "if # is 3:   övverövvernäx Johrzehnt"
   - "if # is 4:   övverövverövvernäx Johrzehnt"
   - "if # is 5:   övverövverövverövvernäx Johrzehnt"
   - "if # is N:   vör # Johrzehnte"
  CENTURIES:
   - "if # is 0:   diß Johondert"
   - "if # is 1:   näx Johondert"
   - "if # is 2:   övvernäx Johondert"
   - "if # is 3:   övverövvernäx Johondert"
   - "if # is 4:   övverövverövvernäx Johondert"
   - "if # is 5:   övverövverövverövvernäx Johondert"
   - "if # is N:   vör # Johonderte"
  MILLENNIA:
   - "if # is 0:   diß Johdousend"
   - "if # is 1:   näx Johdousend"
   - "if # is 2:   övvernäx Johdousend"
   - "if # is 3:   övverövvernäx Johdousend"
   - "if # is 4:   övverövverövvernäx Johdousend"
   - "if # is 5:   övverövverövverövvernäx Johdousend"
   - "if # is N:   vör # Johdousende"

German

interval-past:
  SECONDS:
   - "if # is 1:          vor einer Sekunde"
   - "if # is N:          vor # Sekunden"
  MINUTES:
   - "if # is 1:          vor einer Minute"
   - "if # is N:          vor # Minuten"
  HOURS:
   - "if # is 1:          vor einer Stunde"
   - "if # is N:          vor # Stunden"
  DAYS:
   - "if # is 1:          vor einem Tag"
   - "if # is N:          vor # Tagen"
  WEEKS:
   - "if # is 1:          vor einer Woche"
   - "if # is N:          vor # Wochen"
  MONTHS:
   - "if # is 1:          vor einem Monat"
   - "if # is N:          vor # Monaten"
  YEARS:
   - "if # is 1:          vor einem Jahr"
   - "if # is N:          vor # Jahren"
  DECADES:
   - "if # is 1:          vor einem Jahrzehnt"
   - "if # is N:          vor # Jahrzehnten"
  CENTURIES:
   - "if # is 1:          vor einem Jahrhundert"
   - "if # is N:          vor # Jahrhunderten"
  MILLENNIA:
   - "if # is 1:          vor einem Jahrtausend"
   - "if # is N:          vor # Jahrtausenden"

interval-future:
  SECONDS:
   - "if # is 1:          in einer Sekunde"
   - "if # is N:          in # Sekunden"
  MINUTES:
   - "if # is 1:          in einer Minute"
   - "if # is N:          in # Minuten"
  HOURS:
   - "if # is 1:          in einer Stunde"
   - "if # is N:          in # Stunden"
  DAYS:
   - "if # is 1:          in einem Tag"
   - "if # is N:          in # Tagen"
  WEEKS:
   - "if # is 1:          in einer Woche"
   - "if # is N:          in # Wochen"
  MONTHS:
   - "if # is 1:          in einem Monat"
   - "if # is N:          in # Monaten"
  YEARS:
   - "if # is 1:          in einem Jahr"
   - "if # is N:          in # Jahren"
  DECADES:
   - "if # is 1:          in einem Jahrzehnt"
   - "if # is N:          in # Jahrzehnten"
  CENTURIES:
   - "if # is 1:          in einem Jahrhundert"
   - "if # is N:          in # Jahrhunderten"
  MILLENNIA:
   - "if # is 1:          in einem Jahrtausend"
   - "if # is N:          in # Jahrtausenden"

duration:
  SECONDS:
   - "if # is 1:          für eine Sekunde"
   - "if # is 1:          eine Sekunde lang"
   - "if # is N:          für # Sekunden"
   - "if # is N:          # Sekunden lang"
  MINUTES:
   - "if # is 1:          für eine Minute"
   - "if # is 1:          eine Minute lang"
   - "if # is N:          für # Minuten"
   - "if # is N:          # Minuten lang"
  HOURS:
   - "if # is 1:          für eine Stunde"
   - "if # is 1:          eine Stunde lang"
   - "if # is N:          für # Stunden"
   - "if # is N:          # Stunden lang"
  DAYS:
   - "if # is 1:          für einen Tag"
   - "if # is 1:          einen Tag lang"
   - "if # is N:          für # Tage"
   - "if # is N:          # Tage lang"
  WEEKS:
   - "if # is 1:          für eine Woche"
   - "if # is 1:          eine Woche lang"
   - "if # is N:          für # Wochen"
   - "if # is N:          # Wochen lang"
  MONTHS:
   - "if # is 1:          für einen Monat"
   - "if # is 1:          einen Monat lang"
   - "if # is N:          für # Monate"
   - "if # is N:          # Monate lang"
  YEARS:
   - "if # is 1:          für ein Jahr"
   - "if # is 1:          ein Jahr lang"
   - "if # is N:          für # Jahre"
   - "if # is N:          # Jahre lang"
  DECADES:
   - "if # is 1:          für ein Jahrzehnt"
   - "if # is 1:          ein Jahrzehnt lang"
   - "if # is N:          für # Jahrzehnte"
   - "if # is N:          # Jahrzehnte lang"
  CENTURIES:
   - "if # is 1:          für ein Jahrhundert"
   - "if # is 1:          ein Jahrhundert lang"
   - "if # is N:          für # Jahrhunderte"
   - "if # is N:          # Jahrhunderte lang"
  MILLENNIA:
   - "if # is 1:          für ein Jahrtausend"
   - "if # is 1:          ein Jahrtausend lang"
   - "if # is N:          für # Jahrtausende"
   - "if # is N:          # Jahrtausende lang"