Documentation Index
Fetch the complete documentation index at: https://mintlify.com/DavidCevallos15/inforario-IA-null/llms.txt
Use this file to discover all available pages before exploring further.
icsGenerator.ts produces a standards-compliant iCalendar (.ics) file from an Inforario Schedule and triggers a direct browser download. The file contains one VEVENT per schedulable class session, each with a weekly recurrence rule spanning the entire semester. Import the resulting file into any calendar application that supports the iCalendar format (RFC 5545), such as Google Calendar, Apple Calendar, or Outlook.
generateICS()
VCALENDAR text in memory, creates a Blob URL, and programmatically clicks a hidden <a> element to trigger a browser download. Returns void — there is no programmatic return value.
The parsed schedule object. All sessions in
schedule.sessions are iterated; only those that pass the filter criteria below produce a VEVENT.The first day of the semester. Used as the anchor point for
getFirstOccurrence() to compute the exact DTSTART and DTEND of the first weekly recurrence.The last day of the semester. Written into the
RRULE UNTIL field in UTC format (YYYYMMDDTHHMMSSZ) using Date.getUTCFullYear() etc. specifically at T235959Z.| Condition | Reason |
|---|---|
session.isVirtual === true | No physical time slot to schedule |
session.day is undefined | Cannot determine recurrence day |
session.startTime is undefined | Cannot set DTSTART |
session.endTime is undefined | Cannot set DTEND |
schedule.academic_period are replaced with underscores. If academic_period is not set, the filename becomes horario_horario.ics.
VCALENDAR header fields
DTSTAMP uses UTC format (T000000Z), but DTSTART/DTEND use floating local time (no UTC offset suffix). Make sure your calendar app is set to the correct local timezone when importing the file, or events may appear shifted by your UTC offset.Supporting functions
getFirstOccurrence()
startDate that falls on dayName with the given startTime.
Anchor date — typically the first day of the semester. The function creates an internal copy and never mutates the input.
Spanish day name:
'Lunes', 'Martes', 'Miércoles', 'Jueves', 'Viernes', 'Sábado', or 'Domingo'. Looked up in DAY_TO_NUM to get the Date.getDay() target value.Time string in
"HH:MM" format. Hours and minutes are applied with Date.setHours(hours, mins, 0, 0).Date object set to the first occurrence of that weekday on or after startDate, with startTime applied as local hours/minutes.
Day-advance logic:
formatICSDate()
Date object to the iCalendar floating datetime format: YYYYMMDDTHHMMSS (no Z suffix, no UTC conversion).
Any JavaScript
Date. The function reads local time fields (getFullYear, getMonth, getDate, getHours, getMinutes). Seconds are always 00.Constants
DAY_TO_ICS_DAY
Maps Spanish day names to their two-letter iCalendar BYDAY codes used inside RRULE.
DAY_TO_NUM
Maps Spanish day names to their Date.getDay() index (0 = Sunday).