From a4b11e1ffaacbd3118700e4c5f666036f6e7b139 Mon Sep 17 00:00:00 2001 From: Sven van Heugten Date: Sat, 10 Jan 2026 21:09:44 +0100 Subject: [PATCH] Change start of day to 6.00am --- NightLight.Core.Tests/TimeChangedGenerators.fs | 2 +- NightLight.Core/PartsOfDay.fs | 2 +- README.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/NightLight.Core.Tests/TimeChangedGenerators.fs b/NightLight.Core.Tests/TimeChangedGenerators.fs index 4769474..7ab279a 100644 --- a/NightLight.Core.Tests/TimeChangedGenerators.fs +++ b/NightLight.Core.Tests/TimeChangedGenerators.fs @@ -4,7 +4,7 @@ open System open FsCheck.FSharp let private isDay (time: DateTime) = - time.TimeOfDay >= TimeSpan.FromHours 5.5 + time.TimeOfDay >= TimeSpan.FromHours 6 && time.TimeOfDay < TimeSpan.FromHours 20.5 let private isTimeChangedMeetingCondition condition interaction = diff --git a/NightLight.Core/PartsOfDay.fs b/NightLight.Core/PartsOfDay.fs index 8cfc3c3..ac430f4 100644 --- a/NightLight.Core/PartsOfDay.fs +++ b/NightLight.Core/PartsOfDay.fs @@ -9,7 +9,7 @@ type PartOfDay = let getPartOfDay (dateTime: DateTime) = match dateTime with | _ when - dateTime.TimeOfDay >= TimeSpan.FromHours 5.5 + dateTime.TimeOfDay >= TimeSpan.FromHours 6 && dateTime.TimeOfDay < TimeSpan.FromHours 20.5 -> Day diff --git a/README.md b/README.md index b70f026..56a365b 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ This is an F# program that turns all the lights in our apartment * _red_ at 8.30pm in the evening, and -* _white_/_yellow_ (depending on the room) at 5.30am in the morning. +* _white_/_yellow_ (depending on the room) at 6.00am in the morning. `NightLight.Core` is the functional core, and `NightLight` is the imperative shell.