Flexible Time Slot Generation
A zero-dependency, timezone-aware library for generating time slots. Handles exclusions, buffers, and alignments.
Effortless setup
With a simple declarative API to define and use your schedules.
Single Day Schedule
1import { generateTimeslots } from 'timeslottr';23const slots = generateTimeslots({4 day: '2024-01-01',5 timezone: 'America/New_York',6 range: { start: '09:00', end: '17:00' },7 slotDurationMinutes: 30,8 excludedWindows: [9 { start: '12:00', end: '13:00' }10 ]11});
Multi-Day Schedule
1import { generateDailyTimeslots } from 'timeslottr';23const slots = generateDailyTimeslots(4 { start: '2024-01-01', end: '2024-01-08' },5 {6 range: { start: '09:00', end: '17:00' },7 slotDurationMinutes: 60,8 timezone: 'America/New_York'9 }10);
Interactive Demo
See it in action
Configure your schedule rules on the left and see the generated slots instantly on the right.
Configuration
Adjust the settings to customize slot generation.
No excluded windows defined.
Generated Slots
Preview of the time slots based on your configuration.
No slots to display.
JSON Output
The raw data generated by the library.
[]