Need some source code or an idea please.
Need some source code or an idea please.
Author
Discussion

ProPlus

Original Poster:

3,810 posts

270 months

Thursday 16th February 2006
quotequote all
Does anyone have or know where I can find some C or C++ source code that works out the British bank holidays??

I have tried google and that just wants to bring back C++ jobs that I can apply for and I dont work bank holidays....

Bit strange, can anyone help?

Cheers

Si

docevi1

10,430 posts

278 months

Thursday 16th February 2006
quotequote all
work out? Could you not store the bank-holidays in a text file and work from there?

Plotloss

67,280 posts

300 months

Thursday 16th February 2006
quotequote all
As Stefan says, exclusion calendars are how its usually done.

Dont know if there is a hard and fast mathematical rule.

Don

28,378 posts

314 months

Thursday 16th February 2006
quotequote all
There's no "working out". The days are decided upon. Easter moves around quite a bit and is decided internationally - then the public holidays are declared and you can find them on a government web-site. The May bank holidays are also decided upon - but nationally - as is August's. Christmas Day and Boxing Day may be fixed - but which days are "bank holidays" get declared.

In our app we have a database table filled with the days. I populate the table from the government data for a few years in advance as soon as its available.

bjwoods

5,018 posts

314 months

Thursday 16th February 2006
quotequote all
You'll be asking for a rule to give the date of the next general election next...

Time to get out a bit more and engage thought processes perhaps

ProPlus

Original Poster:

3,810 posts

270 months

Thursday 16th February 2006
quotequote all
Don said:
There's no "working out". The days are decided upon. Easter moves around quite a bit and is decided internationally - then the public holidays are declared and you can find them on a government web-site. The May bank holidays are also decided upon - but nationally - as is August's. Christmas Day and Boxing Day may be fixed - but which days are "bank holidays" get declared.

In our app we have a database table filled with the days. I populate the table from the government data for a few years in advance as soon as its available.


Do you have a link to the website in question??

Don

28,378 posts

314 months

Thursday 16th February 2006
quotequote all

ProPlus

Original Poster:

3,810 posts

270 months

Thursday 16th February 2006
quotequote all
Don said:
www.dti.gov.uk/er/bankhol.htm

Hope this helps.


Cheers

jamieboy

5,929 posts

259 months

Thursday 16th February 2006
quotequote all
...and if they're always on that page, it's not rocket science to parse the page from your code. That way you won't be caught out by 'specials' for somebody famous dying, or England winning the World Cup, or whatever.

ed. for spelling

>> Edited by jamieboy on Thursday 16th February 12:24

Neilus

908 posts

312 months

Thursday 16th February 2006
quotequote all
Don said:
There's no "working out". The days are decided upon. Easter moves around quite a bit and is decided internationally


Don,

I think there are rules for deciding when Easter is... see here

BBC said:
The general rule is that Easter Sunday is the first Sunday after the first Full Moon on or after the Spring Equinox.


Neil.

Ps. Aren't all the Bank Holiday Monday's generally agreed to be the first and last Monday's of May and the last Monday of August?

Don

28,378 posts

314 months

Thursday 16th February 2006
quotequote all
Neilus said:
Don said:
There's no "working out". The days are decided upon. Easter moves around quite a bit and is decided internationally


Don,

I think there are rules for deciding when Easter is... see here

BBC said:
The general rule is that Easter Sunday is the first Sunday after the first Full Moon on or after the Spring Equinox.


Neil.

Ps. Aren't all the Bank Holiday Monday's generally agreed to be the first and last Monday's of May and the last Monday of August?


Good info. I did think that, despite the algorithms, when public holidays are is subject to Goverment discretion? So this may, indeed, be how its worked out - but they can add days (like the Queen's jubilee a few years back) and move them if necessary?