CategoryToday’s random F# code

Your First day on the team = releasing Your first feature

Y

Welcome to our team! Today is your first day, which means it’s the day you’ll release your first feature. You’ll see everything needed to design, implement, and release a feature in our system. We’ll touch on F# language features, our TDD style, and some architecture topics.

This blog post is part of the F# Advent Calendar 2024 (thanks, Sergey, for the organisation).

Today’s random F# code: Using measures to give types more meaning

T

We use NodaTime in our application to deal with time. As you may remember, time is very important in our application – it’s a attendance time-tracking tool with duty planning and many more features. For example, we use Instant to model a point in time. But sometimes, we need a point in time with a granularity of minutes, not nanoseconds. Instead of introducing our own type to model an instant with minute granularity, we use an Instant with a measure. Let’s see how this works:

Recent Posts