/*************************************************************************** * Calendar v1.0, 2026-06-25 * Adding current day to [[Module:Calendar]] * Original author: Roland Unger * Support of desktop and mobile views * License: GPL-2.0+, CC-by-sa 3.0 ***************************************************************************/ ( function ( $ ) { 'use strict'; const addTodayToCalendar = () => { const calendars = $( '.voy-calendar-show-today' ); if ( calendars.length ) { const classPrefix = '.voy-calendar-', today = new Date(), d = String( today.getDate() ), m = String( today.getMonth() + 1 ), // January is 0 yyyy = today.getFullYear(), monthFilter = `${classPrefix}${yyyy}-${m}`, daySelector = classPrefix + d; calendars.filter( monthFilter ).each( function() { $( this ).find( daySelector ).addClass( 'voy-calendar-today' ); } ); } }; addTodayToCalendar(); } ( jQuery ) );