Answer the question
In order to leave comments, you need to log in
working with calendar in java?
You need to somehow take, for example, all the days of the next month except Saturday, Sunday, you do not need to draw a console application, although you can draw
Answer the question
In order to leave comments, you need to log in
Take one of the open source solutions like https://www.joda.org/joda-time/ .
The main thing to understand is that java will not know about public holidays in the Russian Federation, and this may affect weekends.
You need a package of standard java classes to work with time - java.time . Learn, understand, apply.
If you write in java before 8, then yes, joda-time will help you.
And if you are completely lazy and uninitiative, then here it is .
PS If you still need to know about weekends, holidays and pre-holiday days, then I will take this opportunity to advertise one of my home projects - productive-calendar . True, it is in kotlin. And it doesn't exactly do what you want.
However, you might grab something for yourself. More precisely, I get information about weekends, holidays and pre-holiday days from the open data portal, parse it and save it as json, which I then use to perform queries like "How many working days between dates", etc.
A friend of mine has a similar project on groovy about pulling out a production calendar from popular sites in json - holidays-calendar
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question