ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » business holidays array

Post new topic  Reply to topic
 business holidays array « View previous topic :: View next topic » 
Author Message
Sam Uppu
PostPosted: Tue Feb 09, 2010 5:04 pm    Post subject: business holidays array Reply with quote

Yatiri

Joined: 11 Nov 2008
Posts: 610

Hi Guys,

We have a new requirement where we compare today's date with the business holidays and see if it is in the holidays list. If not in holidays list we will send message to the application.

To prepare a holidays list array I thought of using shared variables with ROW datatype.

Business holidays like New Year(Jan 1st, Christmas Dec 25th) which will occur on the same date every year, I will include in the shared variable array.

But the business holiday also includes Good Friday and Easter.

I am wondering how to compare the todays date with the Good Friday or Easter which don't have same date every year.


Please throw some light on this.


Thanks
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Feb 09, 2010 6:34 pm    Post subject: Re: business holidays array Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Sam Uppu wrote:
I am wondering how to compare the todays date with the Good Friday or Easter which don't have same date every year.


Well you could calculate the date of Easter as shown here but it's more typical to hold a list of business holidays in a database table or similar and look them up given the complexity of the calculation!

I don't suppose the Council of Nicaea really considered the difficulties of automating the calculation...
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Tue Feb 09, 2010 11:32 pm    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

I agree with Vitor here. Store the data FOR EVERY public holiday in a DB.
These are published at least a year in advance so updating the table need only happen once a year.
This way you get the flexibility of being able to add a holiday at short notice.
For example, if someone assasinates your President/King/Queen/Benevolent Dictator then the Government might declare a public holiday on the day of their funeral.
Just add a row to the table.
OR
If you populate the table with every day of the year (for 1-3 years in advance) then all you need to do is update a flag on an existing row.

I used the latter method on a system for Road Traffic Pricing. Not only were public holidays free but the period between Christmas & New Year was also.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
mqmatt
PostPosted: Wed Feb 10, 2010 5:12 am    Post subject: Reply with quote

Grand Master

Joined: 04 Aug 2004
Posts: 1213
Location: Hursley, UK

Agree with the other posts. I consider holiday dates etc. to be business information, and as such, should not be hard-coded into a flow.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » business holidays array
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.