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…
![]()
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.
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!!! ![]()
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