Eliminating bank holidays!

Hi everyone,I was wondering does anyone have any suggestions on an application am working on at the minute. It is a database which handles holiday requests of employees. I have already eliminated the weekends, its the bank holidays (rep. of ireland) that is giving me problems. I know most of them are in the first monday of certain months but how do I get the first monday of certain months every year as the date will obviously change every year. Is there any functions i should be looking at (p.s. i’m using formula language) Any help will be appreciated, thanks…

Subject: Just for grins…

Go back to this thread…

http://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/8e8e8d848f2f30da85256e7f004e0714?OpenDocument

:slight_smile:

Subject: Eliminating bank holidays!!

Well the rules are pretty clear:

http://www.oasis.gov.ie/employment/holidays_and_leave/annual_leave_public_holidays.html

I’d do an agent in lotusscript me, scheduled for Jan 1. The interesting bit would be something like:

Sub Initialize

Dim yearStr As String



yearStr = Cstr(Year(Now))



Dim holidays List As NotesDateTime

Dim months List As String



months("05") = "01"

months("06") = "01"

months("08") = "01"

months("10") = "31"



Forall m In months		

	Set holidays(Listtag(m)) = New NotesDateTime(m + "/" + Listtag(m) + "/" + yearStr)

	Select Case m

	Case "01":

		While Weekday(holidays(Listtag(m)).LSLocalTime) <> 2

			holidays(Listtag(m)).AdjustDay(1)

		Wend

	Case "31":

		While Weekday(holidays(Listtag(m)).LSLocalTime) <> 2

			holidays(Listtag(m)).AdjustDay(-1)

		Wend

	End Select

End Forall



'all the holidays should be in the holidays list 

Forall h In holidays

	

	Print Format$(h.LSLocalTime, "Long Date")

	'or do whatever

	

End Forall

End Sub

Subject: Eliminating bank holidays!!

Mickey,

Take a look at my Leave Tracking app on OpenNtf.org

http://www.openntf.org/Projects/pmt.nsf/HomeLookup/FC8045D3A533BD6086256FEF006EEEC5?OpenDocument

Or better yet, take it and use it,

Bob

Subject: RE: Eliminating bank holidays!!

Sorry Bob, I cannot access it from work…is there any particular part you could post that I could take a look at? Thanks…

Subject: RE: Eliminating bank holidays!!

Mickey,

When you go out then take a look at the way we set up our own Company Holiday documents. Don’t even try to figure these floaters out: just copy/Paste the Holiday documents, adjust the years, and then the dates if necessary.

HTH,

Bob

Subject: RE: Eliminating bank holidays!!

Hi Mickey,

If you’re based in Ireland I’ll post it to on a CD, send your postal addresss to g cousins at electricpaper . ie. Trying to work out floating holidays using formula or lotus script is possible but not really worth it.

If you want to go through the pain have a look at this post in the “4 and 5” forum, it relates to US holidays but you’ll get the idea.

http://www-10.lotus.com/ldd/46dom.nsf/55c38d716d632d9b8525689b005ba1c0/85dbc7603289c85485256e7b004c4cbb?OpenDocument

Gary

Subject: Eliminating bank holidays!!

Mickey,

Use the @BusinessDays function

In the days to exclude parameter, do a lookup of all your “holiday” documents, or the field where you store the company holidays

HTH

Mike

PS - Bob - LeaveTracker app looks great. I signed up to OpenNTF today - might start using bits of it!!! :slight_smile:

Subject: RE: Eliminating bank holidays!!

Mike,

Glad to hear that you like LeaveTracking. Should be a 2.2.1 coming out in the near future with some additional rough places smoothed out =:-O

Bob