Make the day start at 5.30am instead
This commit is contained in:
parent
284fdc1261
commit
9b6420b8a8
2 changed files with 6 additions and 2 deletions
|
|
@ -8,5 +8,9 @@ type PartOfDay =
|
||||||
|
|
||||||
let getPartOfDay (dateTime: DateTime) =
|
let getPartOfDay (dateTime: DateTime) =
|
||||||
match dateTime with
|
match dateTime with
|
||||||
| _ when dateTime.TimeOfDay >= TimeSpan.FromHours 4.75 && dateTime.TimeOfDay < TimeSpan.FromHours 20.5 -> Day
|
| _ when
|
||||||
|
dateTime.TimeOfDay >= TimeSpan.FromHours 5.5
|
||||||
|
&& dateTime.TimeOfDay < TimeSpan.FromHours 20.5
|
||||||
|
->
|
||||||
|
Day
|
||||||
| _ -> Night
|
| _ -> Night
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
This is an F# program that turns all the lights in our apartment
|
This is an F# program that turns all the lights in our apartment
|
||||||
|
|
||||||
* _red_ at 8.30pm in the evening, and
|
* _red_ at 8.30pm in the evening, and
|
||||||
* _white_/_yellow_ (depending on the room) at 4.45am in the morning.
|
* _white_/_yellow_ (depending on the room) at 5.30am in the morning.
|
||||||
|
|
||||||
`NightLight.Core` is the functional core, and `NightLight` is the imperative shell.
|
`NightLight.Core` is the functional core, and `NightLight` is the imperative shell.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue