@@ -10,33 +10,33 @@ layout: layouts/base.vto
1010{{ set getISOWeek = (dateStr ) => {
1111 // Parse date string to components
1212 const [year , month , day ] = dateStr .split (' -' ).map (n => parseInt (n, 10 ));
13-
13+
1414 // Create date in UTC to avoid timezone issues - use noon to avoid DST issues
1515 const date = new Date (Date .UTC (year, month - 1 , day, 12 , 0 , 0 , 0 ));
16-
16+
1717 // Make a copy
1818 const d = new Date (date .valueOf ());
19-
19+
2020 // ISO week starts on Monday, make Sunday = 7
2121 const dayOfWeek = d .getUTCDay () || 7 ;
22-
22+
2323 // Find the Thursday of the current week
2424 d .setUTCDate (d .getUTCDate () + 4 - dayOfWeek);
25-
25+
2626 // The year of that Thursday determines the ISO year
2727 const isoYear = d .getUTCFullYear ();
28-
28+
2929 // Find January 4th of that year (always in week 1)
3030 const jan4 = new Date (Date .UTC (isoYear, 0 , 4 , 12 , 0 , 0 , 0 ));
31-
31+
3232 // Find Monday of week 1
3333 const jan4Day = jan4 .getUTCDay () || 7 ;
3434 const week1Monday = new Date (jan4 .valueOf ());
3535 week1Monday .setUTCDate (jan4 .getUTCDate () - jan4Day + 1 );
36-
36+
3737 // Calculate weeks between
3838 const weekDiff = Math .round ((d .valueOf () - week1Monday .valueOf ()) / (7 * 86400000 ));
39-
39+
4040 return weekDiff + 1 ;
4141} }}
4242
@@ -121,7 +121,7 @@ layout: layouts/base.vto
121121 {{ set firstDay = (firstDayRaw + 6 ) % 7 }} {{# Convert Sunday=0 to Monday=0 #}}
122122
123123 < div
124- class = " bg-white rounded-lg shadow-md overflow-hidden month-card flex flex-col"
124+ class = " bg-white rounded-xl shadow-md month-card flex flex-col"
125125 data- year= " {{ year }}"
126126 data- month= " {{ monthIndex }}"
127127 x- show= " currentYear === {{ year }}"
@@ -137,7 +137,7 @@ layout: layouts/base.vto
137137 < / h2>
138138 < / div>
139139
140- < div class = " p-4 bg-white flex-1" x- show= " !collapsed" x- transition>
140+ < div class = " p-4 bg-white flex-1 rounded-xl " x- show= " !collapsed" x- transition>
141141 < div class = " grid grid-cols-8 gap-1 text-xs" >
142142 {{# Week day headers #}}
143143 < div>< / div>
@@ -539,8 +539,8 @@ function eventsPage() {
539539
540540 isToday (year , month , day ) {
541541 const today = new Date ();
542- return year === today .getFullYear () &&
543- month === today .getMonth () &&
542+ return year === today .getFullYear () &&
543+ month === today .getMonth () &&
544544 day === today .getDate ();
545545 },
546546
0 commit comments