Pide hoy y recíbelo entre el
Cargando...
y el
Cargando...
Envío gratuito para todos los pedidos
Este producto y su embalaje pueden ser reciclados.
(function() {
// Fonction pour formater la date en espagnol
function formatearFechaES(date) {
const dias = ['Domingo', 'Lunes', 'Martes', 'Miércoles', 'Jueves', 'Viernes', 'Sábado'];
const meses = ['enero', 'febrero', 'marzo', 'abril', 'mayo', 'junio',
'julio', 'agosto', 'septiembre', 'octubre', 'noviembre', 'diciembre'];
const diaSemana = dias[date.getDay()];
const dia = date.getDate();
const mes = meses[date.getMonth()];
return `${diaSemana}, ${dia} de ${mes}`;
}
// Calculer les dates de livraison
function actualizarFechasEntrega() {
const elemInicio = document.getElementById('fecha-inicio');
const elemFin = document.getElementById('fecha-fin');
if (!elemInicio || !elemFin) {
// Réessayer après un court délai si les éléments ne sont pas encore disponibles
setTimeout(actualizarFechasEntrega, 100);
return;
}
const hoy = new Date();
// Date de début : aujourd'hui + 5 jours
const fechaInicio = new Date(hoy);
fechaInicio.setDate(hoy.getDate() + 5);
// Date de fin : aujourd'hui + 10 jours
const fechaFin = new Date(hoy);
fechaFin.setDate(hoy.getDate() + 10);
// Mettre à jour le HTML
elemInicio.textContent = formatearFechaES(fechaInicio);
elemFin.textContent = formatearFechaES(fechaFin);
}
// Exécuter immédiatement et aussi après le chargement complet
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', actualizarFechasEntrega);
} else {
actualizarFechasEntrega();
}
})();
Choosing a selection results in a full page refresh.