function ObtenerFechaConFormatoDMY(A){dParts=A.split("/");return new Date(dParts[2],Number(dParts[1])-1,Number(dParts[0]))}var gsMonthNames=new Array("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Deciembre");var gsDayNames=new Array("domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado");String.prototype.zf=function(A){return"0".string(A-this.length)+this};String.prototype.string=function(A){var C="",B=0;while(B++<A){C+=this}return C};Number.prototype.zf=function(A){return this.toString().zf(A)};Date.prototype.format=function(A){if(!this.valueOf()){return"n.a."}var B=this;return A.replace(/(yyyy|yy|y|MMMM|MMM|MM|M|dddd|ddd|dd|d|HH|H|hh|h|mm|m|ss|s|t|x)/gi,function(C){switch(C){case"yyyy":return B.getFullYear();case"yy":return(B.getFullYear()%100).zf(2);case"y":return(B.getFullYear()%100);case"MMMM":return gsMonthNames[B.getMonth()];case"MMM":return gsMonthNames[B.getMonth()].substr(0,3);case"MM":return(B.getMonth()+1).zf(2);case"M":return(B.getMonth()+1);case"dddd":return gsDayNames[B.getDay()];case"ddd":return gsDayNames[B.getDay()].substr(0,3);case"dd":return B.getDate().zf(2);case"d":return B.getDate();case"HH":return B.getHours().zf(2);case"H":return B.getHours();case"hh":return((h=B.getHours()%12)?h:12).zf(2);case"h":return((h=B.getHours()%12)?h:12);case"mm":return B.getMinutes().zf(2);case"m":return B.getMinutes();case"ss":return B.getSeconds().zf(2);case"s":return B.getSeconds();case"t":return B.getHours()<12?"am":"pm";case"x":switch(B.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}}})};