QuickDateFormatter class updated
Just a quick update to my QuickDateFormatter class. Raymond Camden noticed a peculiar hiccup when using DateFormatter to format GMT dates without constructing an actual Date object. Since my wrapper class skipped that usually optional step, it was affected by the same issue. Here is the updated code.
{
import mx.formatters.DateFormatter;
public class QuickDateFormatter
{
public static function format(str_dateString:String, str_dateFormat:String):String
{
var f:DateFormatter = new DateFormatter();
f.formatString = str_dateFormat;
return f.format(new Date(str_dateString));
}
}
}
Recent Comments