calander

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.

Moderators: Benj, Mods

Post Reply
970013
Posts: 2
Joined: Tue Nov 28, 2006 8:45 pm

calander

Post by 970013 »

how do i make a calander on flowcode and when it reches a leep year it put in the extra day in febuary..

Mark
Posts: 209
Joined: Thu Oct 19, 2006 11:46 am
Location: Bakewell, UK
Has thanked: 20 times
Been thanked: 16 times

Leap Year

Post by Mark »

The hard way is to code the following

The Gregorian calendar, the current standard calendar in most of the world, adds a 29th day to February in all years evenly divisible by 4, except for centennial years (those ending in -00), which receive the extra day only if they are evenly divisible by 400.

However, unless you seriously expect your project to still be running in 20 years time then it may be easier to code for the actual years:
2000/04/08/16/20 (???)
So
If Month = 2 (Feb) and Year = 2004 then month = month + 1 when days = 29
If Month = 2 (Feb) and Year = 2008 then month = month + 1 when days = 29 etc

(see related post on calendar)
The calculation route should be easier in C within flowcode as boostC seems to have some good features to find remainders from division calculations and can use 16 bit numbers)

Or can Flowcode 3 find if a remainder is 0 (i.e. exact division) within 16 bit calculations now?
Go with the Flow.

970013
Posts: 2
Joined: Tue Nov 28, 2006 8:45 pm

thanks!!!

Post by 970013 »

thank you very much i just did till 2020. an it works thanks a lot :D

Post Reply