Day of Week and DaylightSaving

Tips, Tricks and methods for programming, learn ways of making your programming life easier, and share your knowledge with others.

Moderators: Benj, Mods

Post Reply
User avatar
tiny
Posts: 200
Joined: Wed Jul 08, 2009 8:29 am
Has thanked: 51 times
Been thanked: 93 times
Contact:

Day of Week and DaylightSaving

Post by tiny »

I needed for my project (4 channel timer) automatic summer time and standard time changeover. Even if I use the Internet time (NTP) to synchronize the RTC, I must GMT 01 or GMT 02 send them along. That's why I've written a routine that calculated by the RTC data the switching data.
This is based on an article in Wikipedia for the determination of the day of the week:

https://de.wikipedia.org/wiki/Wochentagsberechnung

From this, the routines "DayOfWeek.fcfx" and "Daylightsaving with DayOfWeek.fcfx" emerged.
DayOfWeek.fcfx
(6.88 KiB) Downloaded 614 times
DayLightSaving with DayOfWeek.fcfx
(10.48 KiB) Downloaded 630 times

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Day of Week and DaylightSaving

Post by medelec35 »

Hi Tiny,
Thank you for sharing your flowcharts with us.
You have done a great job in converting formula that Flowcode can use.
I'm also interested in calculating the day of the week and when clocks change so wrote a Blog on it if you want to see how I have done it?
Martin

Post Reply