The document contains code to format dates and months from Portuguese into readable strings (e.g. "05/janeiro"). It then uses this code and the user's IP address to dynamically generate and display estimated delivery dates and shipping messages for a Brazilian customer. Specifically, it will show an estimated delivery range between the next 2-5 days and mention if the customer qualifies for free shipping to their region. It also lists guarantees for a 30-day return policy and 7-day exchange/refund period.
The document contains code to format dates and months from Portuguese into readable strings (e.g. "05/janeiro"). It then uses this code and the user's IP address to dynamically generate and display estimated delivery dates and shipping messages for a Brazilian customer. Specifically, it will show an estimated delivery range between the next 2-5 days and mention if the customer qualifies for free shipping to their region. It also lists guarantees for a 30-day return policy and 7-day exchange/refund period.
The document contains code to format dates and months from Portuguese into readable strings (e.g. "05/janeiro"). It then uses this code and the user's IP address to dynamically generate and display estimated delivery dates and shipping messages for a Brazilian customer. Specifically, it will show an estimated delivery range between the next 2-5 days and mention if the customer qualifies for free shipping to their region. It also lists guarantees for a 30-day return policy and 7-day exchange/refund period.
function convertDate(e){var t,o=new Date(e);return[(t=o.getDate(),t<10?"0"+t:t)].join("/")}function getMesExtenso(e){var t=new
Array(12);return t[0]="janeiro",t[1]="fevereiro",t[2]="março",t[3]="abril",t[4]="maio",t[5]="junho",t[6]="julho",t[7]="agosto",t[8]="setembro",t[9]="outu bro",t[10]="novembro",t[11]="dezembro",t[e]}jQuery(document).ready(function(e){var t=new Date,o=t.setDate(t.getDate() +5),n=t.setDate(t.getDate()+2),r=getMesExtenso(t.getMonth());if(convertDate(o)>convertDate(n))var a="<strong>"+convertDate(n)+"</strong> e <strong>"+convertDate(o)+" de "+r+"</strong>";else{if(null==(s=getMesExtenso(t.getMonth()+1)))var s=getMesExtenso(t.getMonth()- 11);a="<strong>"+convertDate(n)+" de "+r+"</strong> e <strong>"+convertDate(o)+" de "+s+"</strong>"}e.getJSON("https://wtfismyip.com/json",function(t){var o=(t=t.YourFuckingLocation).replace(", Brazil","");e(".custom-address").html("<font color='#226a7c'><b>Frete Grátis</b></font> para <strong><font color='#226a7c'>"+o+" e Região</font></strong>"),e(".shipping-estimated").html("Entrega estimada entre "+a+"."),e(".shipping- preview-loading").hide()})});