TomTom Maps for JavaScript
    Preparing search index...

    Type Alias OpeningHours

    Operating hours information for a POI.

    Describes when a location is open for business, including:

    • Regular daily schedules
    • Split shifts (e.g., lunch break closures)
    • Overnight hours
    • 24/7 operation

    Use this to:

    • Display "Open now" / "Closed" status
    • Show upcoming hours
    • Determine if a location is open at a specific time
    • Plan visits during operating hours
    const openingHours: OpeningHours = {
    mode: 'nextSevenDays',
    timeRanges: [
    { start: {...}, end: {...} }, // Monday
    { start: {...}, end: {...} } // Tuesday
    ],
    alwaysOpenThisPeriod: false
    };

    // 24/7 location
    const alwaysOpen: OpeningHours = {
    mode: 'nextSevenDays',
    timeRanges: [],
    alwaysOpenThisPeriod: true
    };
    type OpeningHours = {
        alwaysOpenThisPeriod: boolean;
        mode: OpeningHoursMode;
        timeRanges: TimeRange[];
    }
    Index

    Properties

    alwaysOpenThisPeriod: boolean

    Indicates if the POI is always open during the requested period.

    When true, the location operates 24/7 and timeRanges will be empty. When false, refer to timeRanges for specific open hours.

    Time period mode for the provided hours.

    Currently always 'nextSevenDays'.

    timeRanges: TimeRange[]

    Array of time ranges when the POI is open.

    Each time range represents one opening period. Multiple ranges per day indicate split shifts (e.g., closed for lunch).

    Empty array if alwaysOpenThisPeriod is true.