         var month:String = String(value.getMonth() + 1);
         var year:String = String(value.getFullYear());
 
-        var mask:String;
+		var mask:String;
+		var fullMask:String;
 		var maskLength:int
 		var output:String = "";
-
+		
+		//TODO Support changing locale at runtime
+		var monthNames:Array =
+			ResourceManager.getInstance().getStringArray(
+				"SharedResources", "monthNames");
+		
         length = maskParts.length;
         for (i = 0; i < length; i++)
         {
-            mask = maskParts[i].charAt(0);
+			fullMask = maskParts[i];
+            mask = fullMask.charAt(0);
 			maskLength = maskParts[i].length;
 			
 			if (mask == "D")

					date = "0" + date;
				
				output += date;
			}
			else if (mask == "M")
			{

import mx.managers.IFocusManagerComponent;
import mx.managers.ISystemManager;
import mx.managers.PopUpManager;
import mx.resources.ResourceManager;
import mx.styles.CSSStyleDeclaration;
import mx.styles.StyleManager;
import mx.styles.StyleProxy;
