WIKINDX API 6.10.2

STYLELOC

Table of Contents

Functions

arrayMonthAndSeasonNames()  : array<string|int, string>
Return an array of months and season names
monthAndSeasonName()  : string
Return a month or season name
cardinalToOrdinal()  : string
Make an ordinal from a cardinal. Default is English
cardinalToOrdinalWord()  : string
Convert ordinal to word
cardinalToOrdinalWordLatin()  : string
Convert ordinal to word in Latin
cardinalToGreek()  : string
convert cardinal (Arabic) to Greek numerals
cardinalToRoman()  : string
convert cardinal (Arabic) to Roman numerals

Functions

arrayMonthAndSeasonNames()

Return an array of months and season names

arrayMonthAndSeasonNames(string $format[, string $locale = "en_GB" ]) : array<string|int, string>
Parameters
$format : string

Short form (short), Long form (long) (Default is 'long')

$locale : string = "en_GB"

Code of a locale (format: ll[_Script][_CC])(optional, 'en_GB' by default)

Tags
see
https://en.wikipedia.org/wiki/Ordinal_indicator
see
https://es.wikipedia.org/wiki/Indicador_ordinal

When the formatter had no value for a locale, English names re returned.

Accepted month/season numbers are:

  • 1: January
  • 2: February
  • 3: March
  • 4: April
  • 5: May
  • 6: June
  • 7: July
  • 8: August
  • 9: September
  • 10: October
  • 11: November
  • 12: December
  • 13: Spring
  • 14: Summer
  • 15: Autumn
  • 16: Winter
  • 17: Fall
Return values
array<string|int, string>

monthAndSeasonName()

Return a month or season name

monthAndSeasonName(int $number, string $format[, string $locale = "en_GB" ]) : string
Parameters
$number : int

Month or season number

$format : string

Short form (short), Long form (long) (Default is 'long')

$locale : string = "en_GB"

Code of a locale (format: ll[_Script][_CC])(optional, 'en_GB' by default)

Tags
see
https://en.wikipedia.org/wiki/Ordinal_indicator
see
https://es.wikipedia.org/wiki/Indicador_ordinal

When $number is outside the range 1 to 17, an empty string is returned.

When the formatter had no value for a locale, the English name is returned.

Accepted month/season numbers are:

  • 1: January
  • 2: February
  • 3: March
  • 4: April
  • 5: May
  • 6: June
  • 7: July
  • 8: August
  • 9: September
  • 10: October
  • 11: November
  • 12: December
  • 13: Spring
  • 14: Summer
  • 15: Autumn
  • 16: Winter
  • 17: Fall

For seasons translations are taken from Google Translate [1] or Omniglot [2].

see
https://translate.google.fr

Google Translate [1]

see
https://omniglot.com/language/time/seasons.htm

Omniglot [2]

Return values
string

cardinalToOrdinal()

Make an ordinal from a cardinal. Default is English

cardinalToOrdinal(int $number[, string $locale = "en_GB" ][, string $gender = "m" ][, string $pre = '' ][, string $post = '' ]) : string
Parameters
$number : int

Number value

$locale : string = "en_GB"

Code of a locale (format: ll[_Script][_CC])(optional, 'en_GB' by default)

$gender : string = "m"

One letter code for masculine (m), feminine (f) (optional, 'm' by default)

$pre : string = ''

Tag framing the extension of the ordinal on the left

$post : string = ''

Tag framing the extension of the ordinal on the right

Tags
see
https://en.wikipedia.org/wiki/Ordinal_indicator
see
https://es.wikipedia.org/wiki/Indicador_ordinal

When $number is negative, an empty string is returned.

Return values
string

cardinalToOrdinalWord()

Convert ordinal to word

cardinalToOrdinalWord(int $number[, string $locale = "en_GB" ][, string $gender = "m" ]) : string

This implementation is limited to the numeric range 1 to 10,000 for Latin, and to ICU spec. range for others (very high).

When a formatter is not defined or return an error, the English formatter is used instead.

When $number is negative, an empty string is returned.

Parameters
$number : int

Positive number value

$locale : string = "en_GB"

Code of a locale (format: ll[_Script][_CC])(optional, 'en_GB' by default)

$gender : string = "m"

One letter code for masculine (m), feminine (f), or neutral (n) (optional, 'm' by default)

Tags
see
https://www.saxonica.com/html/documentation10/extensibility/config-extend/localizing/ICU-numbering-dates/ICU-numbering.html
Return values
string

cardinalToOrdinalWordLatin()

Convert ordinal to word in Latin

cardinalToOrdinalWordLatin(int $number[, string $gender = "m" ]) : string

This implementation is limited to the numeric range 1 to 10,000. higher numbers are formatted with ICU English formatter instead.

When $number is negative, an empty string is returned.

Parameters
$number : int

Positive number value

$gender : string = "m"

One letter code for masculine (m), feminine (f), or neutral (n) (optional, 'm' by default)

Return values
string

cardinalToGreek()

convert cardinal (Arabic) to Greek numerals

cardinalToGreek(int $cardinal) : string

This implementation is limited to the numeric range 1 to 9,999 following the ancient greek alphabetical numeral system.

Its use is intended only for modern notation of years, centuries, or volumes ..., like Roman numbers in modern latin scripts.

When $cardinal is outside the accepted range, the empty string is returned.

Parameters
$cardinal : int
Tags
see
https://en.wikipedia.org/wiki/Greek_numerals

Greek numerals (Wikipedia)

see
https://simple.wikipedia.org/wiki/Greek_numerals

Greek numerals (Wikipedia simplified)

see
http://www.russellcottrell.com/greek/utilities/GreekNumberConverter.htm

The Greek Number Converter

see
https://www.researchgate.net/publication/2417759_From_Unicode_to_Typography_a_Case_Study_the_Greek_Script

From Unicode to Typography, a Case Study: the Greek Script, p. 16

Return values
string

cardinalToRoman()

convert cardinal (Arabic) to Roman numerals

cardinalToRoman(int $cardinal) : string

This implementation is limited to the numeric range 0 to 3,999 following the standard form of Roman numerals, plus the medieval nulla (N).

Its use is intended only for modern notation of years, centuries, or volumes ...

When $cardinal is outside the accepted range, the empty string is returned.

Parameters
$cardinal : int
Tags
see
https://en.wikipedia.org/wiki/Roman_numerals#Standard_form
Return values
string

        
On this page

Search results