• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Holiday in date

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is it possible to tell if the date is a holiday? I looked through the api for calendar (we're on 1.3.1 btw) and I didn't see anything that looked like it would return that.
 
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Java does not provide this functionality automatically. It will require some work on your part. Check out JavaWorld's Tips 'N Tricks Java Tip 44: Calculating holidays and their observances for some more info.
 
Kristol Crawley
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I figured it'd be messy!
Thank you Jason!
 
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
here's one I was working on some time ago (I'm not from the US so I'm not entirely sure I have the parameters of the holidays correct)
easter calculation is close, but is incorrect (this is when I stopped), you might be able to add a tweak or two, to get it right.
 
reply
    Bookmark Topic Watch Topic
  • New Topic