Complete website for The Computer Guru Show (radio.azcomputerguru.com): - Astro 6.0.4 static site with React islands - 194 episodes imported from gurushow.com RSS feed - Dark/light mode HSL design system - Persistent audio player with session persistence - Episode archive with search and season filtering - Home page with animated hero, stats, latest episodes - All pages: About, Subscribe, Community, Live, Contact, Blog, 404 - Podcast RSS feed with iTunes namespace - Session log updated Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
15 lines
357 B
TypeScript
15 lines
357 B
TypeScript
export function formatDuration(duration: string): string {
|
|
// Handle HH:MM:SS or MM:SS formats
|
|
const parts = duration.split(':').map(Number);
|
|
if (parts.length === 3) {
|
|
const [h, m] = parts;
|
|
if (h > 0) return `${h}h ${m}m`;
|
|
return `${m}m`;
|
|
}
|
|
if (parts.length === 2) {
|
|
const [m] = parts;
|
|
return `${m}m`;
|
|
}
|
|
return duration;
|
|
}
|