AT&T Home | AT&T Labs | Research
AT&T Labs, Inc. - Research

The Yoix® Scripting Language

Home | What's New | Grammar | Documentation | Download | License | YChart | YDAT | YWAIT | Byzgraf | FAQs
getCalendarLocales () yoix.util
 
Returns an Array of Locale objects that can be used with date, getDateFormat and parseDate to format or parse date / time information in a locale specific manner.
 
 Example:  
import yoix.stdio.*;
import yoix.system.*;
import yoix.util.*;

String format;
Locale locale;
Array  locales;
double timevalue;
int    i;

timevalue = time();
locales = getCalendarLocales();
locale = getLocale();

format = getDateFormat(locale, FALSE, DateFormat.DATETIME,
		       DateFormat.FULL, DateFormat.FULL);

printf("Base format is:\n\t%s\n", date(locale, format, timevalue));
for (i = 0; i < locales@length; i++) {
    locale = locales[i];
    format = getDateFormat(locale, FALSE, DateFormat.DATETIME,
			   DateFormat.FULL, DateFormat.FULL);
    printf("%s format is:\n\t%s\n", locale.displayname,
	   date(locale, format, timevalue));
}
A sample of the output might look as follows:
Base format is:
	Tuesday, October 17, 2000 8:47:00 o'clock PM EDT
English (United States) format is:
	Tuesday, October 17, 2000 8:47:00 o'clock PM EDT
French (France) format is:
	mardi 17 octobre 2000 20 h 47 GMT-04:00
German (Germany) format is:
	Dienstag, 17. Oktober 2000 20.47 Uhr GMT-04:00
Italian (Italy) format is:
	martedì 17 ottobre 2000 20.47.00 GMT-04:00
Lithuanian (Lithuania) format is:
	Antradienis, 2000, Spalio 17 20.47.00 GMT-04:00
Portuguese (Brazil) format is:
	Terça-feira, 17 de Outubro de 2000 20h47min00s GMT-04:00
Slovenian (Slovenia) format is:
	Torek, 2000, oktober 17 20:47:00 GMT-04:00
Spanish (Puerto Rico) format is:
	martes 17 de octubre de 2000 08:47:00 PM GMT-04:00
 
 Return:   Array
 
 See Also:   addCalendar, Calendar, compareCalendar, date getCalendarLeastMaximum, getCalendarMaximum, getCalendarMinimum, getDateFormat, parseDate, rollCalendar, setCalendar

 

Yoix is a registered trademark of AT&T Inc.