You need to sign in to do that
Don't have an account?
Rajesh Shah
Logic to find if given date falls on an Holiday or not
Based on the holidays mentioned in the Company Profile, I need to find out if a given date falls on an Holiday or not? Currently I am doing this using a complex logic where based on all the permutations and combinations like Yearly, Monthly, Daily, etc I try to see if it is a holiday or not. I just wanted to know if there is a simpler way to do this that I don't know about.
I think the idea with Holidays is that, although there are rules like Third Monday, etc., Holidays relies on someone already having computed the holidays. Once those computed dates are entered into Holidays, you then simply query against those to validate a date, right?
Just my $0.02. If someone has a better idea I would love to hear it. Cheers
Static holidays defined in the system are really easy to handle. The problem arises for recurring holidays especially when the condition is complex like Every 2nd Sunday in every 2 months.
Also, what does the field RecurrenceDayOfWeekMask signifies? I tried with few examples but could not understand the value.
what about this, making use of the standard Holiday and WorkingDays specified in Salesforce.com: