system.locale - Palamecia/mint GitHub Wiki

Module

load system.locale

This module provides the System.Locale class which provides access to the locale informations.

Packages

Enums

System.DateFormat

This enum describes the different formats that can be used when converting date and time informations to string.

Constant Value Description
Long 1 Longer format.
Short 0 Shorter format.

System.DateType

This enum describes the different types that can be used when converting date and time informations to string.

Constant Value Description
DateAndTime 0 Date and time format.
DateOnly 1 Date format.
TimeAmPm 3 12-hour format.
TimeOnly 2 Time format.

System.Month

This enum provides the month values as returned by System.Date.getMonth.

Constant Value Description
April 4 Month number for "April".
August 8 Month number for "August".
December 12 Month number for "December".
February 2 Month number for "February".
January 1 Month number for "January".
July 7 Month number for "July".
June 6 Month number for "June".
March 3 Month number for "March".
May 5 Month number for "May".
November 11 Month number for "November".
October 10 Month number for "October".
September 9 Month number for "September".

System.WeekDay

This enum provides the day of week values as returned by System.TimeZone.weekDayFromSeconds or System.TimeZone.weekDayFromMilliseconds.

Constant Value Description
Friday 5 Weekday number for "Friday".
Monday 1 Weekday number for "Monday".
Saturday 6 Weekday number for "Saturday".
Sunday 0 Weekday number for "Sunday".
Thursday 4 Weekday number for "Thursday".
Tuesday 2 Weekday number for "Tuesday".
Wednesday 3 Weekday number for "Wednesday".

Classes

System.Locale

This class provides informations about a specific locale.

Members

Modifiers Member Description
+ const != Returns false if the locale described by other and this object are the sa...
+ const == Returns true if the locale described by other and this object are the sam...
+ const amName Returns the localized name of the "AM" suffix for times specified using the c...
+ @ const current Returns the locale used by this application.
+ const dateFormat Returns the localized format string for System.Date.toString, in the format s...
+ const dayName Returns the localized name of the day, in the format specified by type. T...
- @ g_lib Global library handle.
+ const getName Returns the name of the locale.
+ @ const list Returns a list of all available locale names on this system.
- final locale Internal locale informations.
+ const monthName Returns the localized name of month, in the format specified by type. The...
- final name Internal locale name.
+ const new Creates a new object for the locale identified by desc. The desc paramete...
+ const pmName Returns the localized name of the "PM" suffix for times specified using the c...
+ @ const setCurrent Changes the locale used by this application to locale. An instance of Excep...

Descriptions

System.DateFormat.Long

1

Longer format.

System.DateFormat.Short

0

Shorter format.

System.DateType.DateAndTime

0

Date and time format.

System.DateType.DateOnly

1

Date format.

System.DateType.TimeAmPm

3

12-hour format.

System.DateType.TimeOnly

2

Time format.

System.Locale.!=

def (const self, const other)

Returns false if the locale described by other and this object are the same locale; otherwise returns true.

System.Locale.==

def (const self, const other)

Returns true if the locale described by other and this object are the same locale; otherwise returns false.

System.Locale.amName

def (const self)

Returns the localized name of the "AM" suffix for times specified using the conventions of the 12-hour clock.

System.Locale.current

def ()

Returns the locale used by this application.

System.Locale.dateFormat

def (const self, type = System.DateType.DateAndTime)

Returns the localized format string for System.Date.toString, in the format specified by type.

The value of type can be a value from the System.DateType enum.

System.Locale.dayName

def (const self, day, type = System.DateFormat.Long)

Returns the localized name of the day, in the format specified by type.

The value of day can be a value from the System.WeekDay enum.

System.Locale.g_lib

lib ('libmint-system')

Global library handle.

System.Locale.getName

def (const self)

Returns the name of the locale.

System.Locale.list

def ()

Returns a list of all available locale names on this system.

System.Locale.locale

null

Internal locale informations.

System.Locale.monthName

def (const self, month, type = System.DateFormat.Long)

Returns the localized name of month, in the format specified by type.

The value of month can be a value from the System.Month enum.

System.Locale.name

''

Internal locale name.

System.Locale.new

def (self, desc)

Creates a new object for the locale identified by desc. The desc parameter must be a valid locale name or an instance of System.Locale.

System.Locale.pmName

def (const self)

Returns the localized name of the "PM" suffix for times specified using the conventions of the 12-hour clock.

System.Locale.setCurrent

def (self, locale)

Changes the locale used by this application to locale.

An instance of Exception.SystemError is raised on error.

System.Month.April

4

Month number for "April".

System.Month.August

8

Month number for "August".

System.Month.December

12

Month number for "December".

System.Month.February

2

Month number for "February".

System.Month.January

1

Month number for "January".

System.Month.July

7

Month number for "July".

System.Month.June

6

Month number for "June".

System.Month.March

3

Month number for "March".

System.Month.May

5

Month number for "May".

System.Month.November

11

Month number for "November".

System.Month.October

10

Month number for "October".

System.Month.September

9

Month number for "September".

System.WeekDay.Friday

5

Weekday number for "Friday".

System.WeekDay.Monday

1

Weekday number for "Monday".

System.WeekDay.Saturday

6

Weekday number for "Saturday".

System.WeekDay.Sunday

0

Weekday number for "Sunday".

System.WeekDay.Thursday

4

Weekday number for "Thursday".

System.WeekDay.Tuesday

2

Weekday number for "Tuesday".

System.WeekDay.Wednesday

3

Weekday number for "Wednesday".