If your flight lands at Hobart Airport at 22:45 on a Saturday, how many car hire desks are still open? Comparison sites usually list each company's hours one row at a time, which doesn't answer that. So we turned a published table of depot hours into a small Python model you can query by day and minute.
The input is the depot table in Larkmile's Hobart Airport car hire comparison. It covers 14 companies with a Hobart Airport depot on their own sites. Nine are at the airport and five are a short shuttle ride away in Cambridge. The company pages were read on 25 October 2026, and the airport and shuttle details on 28 October 2026. Hours change, so treat everything below as a snapshot of published hours, not a promise that a desk will be staffed.
Step 1: decide what you can't model
Before writing any code, go through the rows and flag the ones that don't turn into clean intervals. Three of the 14 don't:
- Drive Car Hire publishes no hours. It "says it services all flights".
- Astra Car Rentals: hours "not published".
- YesDrive: "its page says 7am to 11pm, seven days, but its footer shows 7:00-18:00".
The honest choice is to leave these three out of the counts and say so, rather than guess. That leaves 11 companies with hours you can encode.
Two more need a decision:
- Alice Car Rental has seasonal hours: 08:00-20:00 from December to April and 08:00-18:00 from May to November. We model the May to November hours because that's the season the data was read in. Swap them for a summer trip.
- Hertz lists Sunday to Friday as 07:00-24:00. We treat 24:00 as end of day (minute 1440).
Step 2: encode the hours
Most companies publish one set of hours for Sunday to Friday and another for Saturday, so the data structure follows that pattern:
SUN_FRI = [6, 0, 1, 2, 3, 4] # 0 = Monday ... 6 = Sunday
SAT = [5]
ALL = list(range(7))
def h(s):
hh, mm = map(int, s.split(":"))
return 24 * 60 if hh == 24 else hh * 60 + mm
desks = {
"Avis": ("terminal", [(SUN_FRI, "07:30", "21:45"), (SAT, "07:30", "20:30")]),
"Budget": ("terminal", [(ALL, "04:00", "23:30")]),
"Europcar": ("terminal", [(SUN_FRI, "07:00", "23:00"), (SAT, "07:00", "21:30")]),
"Redspot": ("terminal", [(ALL, "07:30", "22:00")]),
"SIXT": ("terminal", [(SUN_FRI, "07:30", "22:30"), (SAT, "07:30", "19:00")]),
"Bargain": ("forecourt", [(ALL, "07:00", "21:00")]),
"Hertz": ("airport", [(SUN_FRI, "07:00", "24:00"), (SAT, "07:00", "22:00")]),
"Thrifty": ("airport", [(SUN_FRI, "07:00", "23:30"), (SAT, "07:00", "21:00")]),
"Alice": ("shuttle", [(ALL, "08:00", "18:00")]), # May to November
"Apex": ("shuttle", [(ALL, "08:00", "17:29")]),
"East Coast": ("shuttle", [(SUN_FRI, "07:00", "20:45"), (SAT, "07:00", "17:30")]),
"Drive Car Hire": ("precinct", None), # no hours published
"Astra": ("shuttle", None), # no hours published
"YesDrive": ("shuttle", None), # two conflicting sets of hours
}
def open_at(day, minute, where=None):
names = []
for name, (loc, rules) in desks.items():
if not rules or (where and loc != where):
continue
if any(day in days and h(a) <= minute < h(b) for days, a, b in rules):
names.append(name)
return names
The where field keeps the depot type from the source table. "Terminal" means a desk or kiosk inside the terminal (Avis, Budget, Europcar, Redspot, SIXT). Bargain is on the terminal forecourt. Hertz and Thrifty list an airport depot on Addison Drive. The shuttle depots are in Cambridge.
Step 3: sweep the day
for minute in range(0, 24 * 60, 30):
names = open_at(2, minute) # a Wednesday
print(f"{minute // 60:02d}:{minute % 60:02d}", len(names))
Run it for a weekday and for Saturday, and the shape is clear. Counts cover the 11 modelled companies:
| Time | Weekday: open | Saturday: open |
|---|---|---|
| 04:00-06:59 | 1 (Budget) | 1 (Budget) |
| 07:00 | 6 | 6 |
| 08:00-17:00 | 11 | 11 |
| 19:30 | 9 | 7 |
| 21:00 | 7 | 4 |
| 21:30 | 7 | 3 |
| 22:00 | 5 | 1 (Budget) |
| 22:30 | 4 | 1 (Budget) |
| 23:00 | 3 (Budget, Hertz, Thrifty) | 1 (Budget) |
| 23:30-23:59 | 1 (Hertz) | 0 |
Sunday runs on the Sunday to Friday hours for every company in the model, so it matches the weekday column.
What the sweep shows:
- Before 07:00, there's one option. Budget opens at 04:00 every day, and nobody else in the model opens before 07:00.
- Saturday night is much thinner than a weekday night. At 22:00 there are five desks open on a weekday and one on a Saturday. Hertz (22:00), SIXT (19:00), Europcar (21:30) and Thrifty (21:00) all close earlier on Saturdays.
- After 23:30, it's Hertz or nothing. On Sunday to Friday, Hertz's listed hours run to midnight. On Saturday, no modelled desk is open after Budget closes at 23:30.
Step 4: filter by where the desk is
If you don't want to wait for a shuttle late at night, count only the desks inside the terminal:
open_at(2, h("23:00"), where="terminal") # ['Budget']
open_at(5, h("21:30"), where="terminal") # ['Budget', 'Redspot']
At 23:00 on a weekday, Budget is the only desk open inside the terminal. Hertz and Thrifty are open too, but they're listed as an airport depot rather than a terminal desk. At 07:00, only Budget and Europcar are open inside the terminal. Avis, Redspot and SIXT open at 07:30.
What the model leaves out
Pick-up hours are only half of the problem. The comparison also lists return rules that don't fit an interval model:
- Avis and Redspot have key drop boxes at their terminal desks. The Avis one works while the airport is open.
- Budget and Apex Car Rentals don't take after-hours returns.
So the company with the earliest opening (Budget, 04:00) won't take a return after hours. For a very early flight out, that matters more than the pick-up sweep. A fuller model would store pick-up and return windows separately.
A few other limits:
- Published hours, not staffing. The model counts what each company's page says. It doesn't know about late-flight arrangements beyond what's published.
- Three companies aren't counted. Drive Car Hire says it services all flights, so the real late-night count could be higher than the table shows.
- Snapshot dates. Company pages were read on 25 October 2026. Rerun the sweep after updating the hours.
Extending it
The same structure works for any airport where you can collect published hours: one tuple per day pattern, a where tag, and None for rows you won't guess. Useful next steps:
- add a
returnsfield (drop box or none) and sweep it separately - give seasonal companies such as Alice Car Rental a date range per rule
- feed in your actual flight time and print the list, not just the count
The point of modelling it this way is the None rows. A count you can trust beats a longer list that quietly assumes hours nobody published.
Larkmile road notes
Top comments (0)