Sitemap

Member-only story

paid time off (PTO) — 6.0

handle half days

3 min readAug 19, 2024

--

During a demo, I was asked about handling half-days off, which I hadn’t initially considered. Employees in my region (Europe) can take full or half days of PTO. My first thought was to manually adjust the PTO count if half days were used, but this would disrupt my ‘next working day’ calculations and future plans to integrate with Google Calendar. I need a date-specific solution to accurately track PTO, including half days.

The solution I devised consists of two interconnected parts. Firstly, a table is required to present employees with various options.

day parts with their value

Secondly, a logic system is necessary to assign these values (0.5 or 1) to specific dates, as illustrated below.

how a table gets filled out

Crucial to this logic is the utilization of the first and last working days within a given period, which are then correlated with the selected option.

The logic for the last day can be derived by replacing First() with Last() in the existing logic for the first day.

--

--

Christiaan Huizer
Christiaan Huizer

Written by Christiaan Huizer

I write every week about how to Coda . You find blogs for beginners and experienced makers. Until 7 days after publication you read my blog for free. Welcome!

No responses yet