Java API for swing for holidays dates in hindu calendar of any year
Asked Answered
S

3

14

Is there any Java API for Swing which will help me to give all holidays dates in Hindu calendar of any year ?

Requirements:

  • API should be open source or free.
Salters answered 29/11, 2012 at 10:15 Comment(8)
What does this have to do with Swing? But good question anyway.Hadfield
Can you add some keypoints you need (paid/free license, open source, strong community required, project maturity ...) ?Satyriasis
@Stephan: because otherwise the plethora of answers would be overwhelming?Hadfield
@Hadfield Since OP is new on SO, I posted my comment just to help him knowing some few guidelines about asking those kind of question.Satyriasis
@Satyriasis i require any free source apiSalters
@Hadfield as i my buliding project on Java Swing so asked for that...thanks in advance for ur helpSalters
if there is no api it will be kind of tough because the hindu festival (holiday) dates wont be on the same day every year.Macromolecule
check this out https://mcmap.net/q/349128/-converting-to-and-from-hindu-calendarMacromolecule
A
10

By far the easiest would be to download a public calendar containing all hindu holidays. You can surely find this on Google. Export the calendar as an iCalendar file.

Then, use iCal4j to parse this file and recover all dates required. http://ical4j.sourceforge.net/introduction.html

Surely, you do not need all mathematical rules for determining hindi holidays implemented until the year 3000?

Albertinaalbertine answered 4/12, 2012 at 14:11 Comment(0)
C
1

Seems there is nothing out of the box for Hindu.

However, Jollyday might be some help. They don't support Hindu out of the box but if you get a file with the date, then you can use it.

Cabaret answered 4/12, 2012 at 14:22 Comment(1)
thanks Florent for ur answers,but i have tried with jollyday but it didnt help me as there is not any fixed date in hindu claneder as its all runs on sun signs.Salters
P
1

There is no straight forward way to calculate the Hindu holidays currently. You can use JollyDay.

It allows you to configure your holidays in XML configuration files named 'Holidays_[country].xml' which contain the necessary information for determining the holidays for a year/country/region.

you can implement something like as below

URL url = new URL("file:some/path/Holidays_India.xml");

HolidayManager m = HolidayManager.getInstance(url);
Set<Holiday> holidays = m.getHolidays(2012, "in");

Refere the API usage for more details.

Pronunciation answered 5/12, 2012 at 1:1 Comment(1)
thanks jayamohan for ur answers,but i have tried with jollyday but it didnt help me as there is not any fixed date in hindu claneder as its all runs on sun signs, so i m unabel to set any rules in xml file.Salters

© 2022 - 2024 — McMap. All rights reserved.