Map a booking
Pass a persistent UID, a title, a start and an end as Date objects. The module serializes the times in UTC. Location, description and revision time are optional.
BEILOFF Toolkit / v1.1.1
Give a customer an “Add to calendar” download as soon as a booking is confirmed. The module puts the time, location and details into one .ics file.
Pass a persistent UID, a title, a start and an end as Date objects. The module serializes the times in UTC. Location, description and revision time are optional.
createCalendarEvent returns a VCALENDAR string with one VEVENT. It preserves description line breaks, escapes text delimiters and folds long UTF-8 lines at character boundaries.
Offer the file on the booking confirmation page. Import displays the event in the calendar’s own time zone. The included example is a consultation running from 09:00 to 09:30 UTC.
README.mdcalendar.mjsexample.mjsbooking.mjsserver.mjsbooking.icscalendar.test.mjsRELEASE.txtEach file describes one timed event. Import creates a snapshot. This edition does not provide subscriptions, attendee invitations, recurring events or all-day events.
Edit text, background and link colours in the style block in server.mjs. Place a logo image with alt text at the start of main and use a reachable image URL. Restart the server and check both languages. The recipient’s calendar sets the imported event’s appearance.
Run node --test calendar.test.mjs. The suite checks UTC timestamps, Unicode text, octet limits, required fields and duration. Open the generated file and compare its displayed time with your original booking.
Added colour and logo customisation instructions to the README.
Added a booking confirmation page with an Add to calendar link and a working Node.js download handler. Moved the sample record into booking.mjs.
First edition with single-event export, a sample booking and tests for time, text and invalid input.