Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Holiday in date

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • Quote
  • Report post to moderator
I figured it'd be messy!
Thank you Jason!
 
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • 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.
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic