Actionscript 3 DateTimeFormatter和setDateTimePattern

Actionscript 3 DateTimeFormatter和setDateTimePattern,actionscript-3,date-formatting,Actionscript 3,Date Formatting,我很难理解AS3 DateTimeFormatter: var df:DateTimeFormatter = new DateTimeFormatter("fr_FR"); df.setDateTimePattern("DD-MM-YYYY"); result = df.format(date); //result = lundi 19 mars 2012 00:01:00 livedoc说使用setDateTimePattern应该覆盖dateStyle和timeStyle,而现在它似乎没有

我很难理解AS3 DateTimeFormatter:

var df:DateTimeFormatter = new DateTimeFormatter("fr_FR");
df.setDateTimePattern("DD-MM-YYYY");
result = df.format(date);
//result = lundi 19 mars 2012 00:01:00
livedoc说使用setDateTimePattern应该覆盖dateStyle和timeStyle,而现在它似乎没有给出关于我设置的模式的任何f***,有人知道这种行为的原因吗

你应该写:

var df:DateTimeFormatter = new DateTimeFormatter("fr_FR");
df.setDateTimePattern("dd-MM-yyyy");
result = df.format(date);

也许你可以试试
dd-MM-yyyy
我没有注意到livedoc上的案例,它现在可以工作了,谢谢!