Coda time off (PTO) — version 3.0
Integrating official holidays per country
In our previous blog post, we presented a filter-based method that generates work schedules by date. However, this only accounts for regular working days within those schedules. Our next step is to incorporate official holidays like Easter and Christmas into the equation.
I should clarify that the situation is actually more complex than previously described. Work schedules are country-specific, due to varying union agreements and regional regulations, particularly in larger countries. Moving forward, I’ll incorporate the country as a variable in our calculations.
The holidays
Holidays vary significantly by country, and sometimes even by state or region. HR departments typically maintain a list of recognized holidays, some mandatory and others optional. This ultimately creates a country-specific calendar of holiday dates, like the one you see below partly based on an automation that updates Eastern based holidays.
To accommodate our employees with Turkish contracts, we also need to factor in Ramadan and Sacrifice Feast. While I haven’t yet developed a calculation for these holidays in Coda, I’ve advised the HR department to consult with the Turkish team to ensure proper scheduling and leave management.
For each country, we have a list of holidays that we integrate with their respective work schedules. We’ve enhanced our work schedule tables by adding a ‘holidayDates’ column to include these dates. This allows us to automatically exclude holidays like August 15th in Belgium from any applicable work schedules.
Next: the yearly holiday balance
In certain countries like Belgium, employees receive compensation or an additional day off when a public holiday falls on a weekend. However, in the Netherlands, that holiday is simply lost. Our next blog post will delve deeper into this topic, exploring the differing approaches and their implications for workers and employers.
I hope you enjoyed this article. If you have questions feel free to reach out. My name is Christiaan and blog about Coda. Though this article is for free, my work (including advice) won’t be, but there is always room for a chat to see what can be done. You find my (for free) contributions in the Coda Community and on Twitter. the Coda Community provides great insights for free once you add a sample doc.
All the AI features we are starting to see appear — lower prices, higher speeds, multimodal capability, voice, large context windows, agentic behavior — are about making AI more present and more naturally connected to human systems and processes. If an AI that seems to reason like a human being can see and interact and plan like a human being, then it can have influence in the human world. This is where AI labs are leading us: to a near future of AI as coworker, friend, and ubiquitous presence. I don’t think anyone, including OpenAI, has a full sense of all of the implications of this shift, and what it will mean for all of us. — source: Ethan Mollick from One Useful Thing.
More about Coda AI and Coda Brain: