Chapter 41 Example 3
♥0 |
Line 20 |
Modified 2010-02-10 08:29:49 |
MIT License
archived:2017-03-20 03:51:55
ActionScript3 source code
/**
* Copyright actionscriptbible ( http://wonderfl.net/user/actionscriptbible )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/6fUG
*/
package {
import com.actionscriptbible.Example;
import flash.globalization.*;
public class ch41ex3 extends Example {
public function ch41ex3() {
var rogerDay:Date = new Date(1981, 4, 12);
var all:Vector.<DateTimeFormatter> = new Vector.<DateTimeFormatter>();
all.push(new DateTimeFormatter("ja-JP", //Japanese/Japan
DateTimeStyle.MEDIUM, DateTimeStyle.NONE));
all.push(new DateTimeFormatter("he-IL", //Hebrew/Israel
DateTimeStyle.LONG, DateTimeStyle.NONE));
all.push(new DateTimeFormatter("pt-PT", //Portuguese/Portugal
DateTimeStyle.LONG, DateTimeStyle.NONE));
for each (var formatter:DateTimeFormatter in all) {
trace(formatter.requestedLocaleIDName,"\t",formatter.format(rogerDay));
}
//I forget, what are the days of the week in Swedish again?
trace((new DateTimeFormatter("sv")).getWeekdayNames().toString());
}
}
}