Full Date format for Youtube (Enhanced)

Show full upload dates in DD/MM/YYYY HH:MMam/pm format with smart queuing, retry, dynamic updates, and UI toggle

< Opiniones de Full Date format for Youtube (Enhanced)

Pregunta o comentario

§
Publicado: 12/07/2025

how do I make it show month in letters? eg. 01/Jan/2025

§
Publicado: 14/07/2025
Editado: 14/07/2025

@version 2.0.9

function formatDate(iso) {
let date = new Date(iso);
let options = { day: 'numeric', month: 'short', year: 'numeric' };
let lang = navigator.language ? navigator.language : 'en-EN';
return date.toLocaleDateString(lang, options).replaceAll('/', '-');
// const date = new Date(iso);
// if (isNaN(date)) return '';
// const d = String(date.getDate()).padStart(2, '0');
// const m = String(date.getMonth() + 1).padStart(2, '0');
// const y = date.getFullYear();
// let h = date.getHours();
// const mm = String(date.getMinutes()).padStart(2, '0');
// const ampm = h >= 12 ? 'pm' : 'am';
// const ampm = h >= 12 ? 'pm' : 'am';
// h = h % 12 || 12;
// return `${d}/${m}/${y} ${h}:${mm}${ampm}`;
}

Publicar respuesta

Inicia sesión para responder.

长期地址
遇到问题?请前往 GitHub 提 Issues。