Yesterday I discovered a new library based on Joda Time and JDK 5 Time, called DateCalc (objectlabkit) http://objectlabkit.sourceforge.net/
This library is useful when our application must deal with holidays and what to do when a calculated day falls on a holiday or weekend.
Imagine next use case:
- Employees have to say how many days of vacation will enjoy from one date. System must notify when employees are at office.
Assume that employee says that he will start his vacations on 22/02/2010 and will be 6 days out of office. So in theory our employee will be at office on 28th day of same month (22 + 6). But looking at calendar, one will see that he won't be there on 28 because it is Sunday (assuming that weekends are Saturday and Sunday). In fact he will be at office on 1/03/2010 (Monday).
This use case can be focused with two approaches:
1) Using java.util.Calendar class, and then the holidays and weekends problem must be controlled by our program. Calculating “what day our employee returns to office” is not only a matter of calling Calendar.add function.
2) Using DateCalc library which watch out for us.
Not only think about weekends and summer holidays, but national holidays like 4th of July in case of USA.
Take a look to its website, there you can find examples and algorithms for handling holiday problem
3 comentarios:
coach outlet online
yeezy
golden goose outlet
longchamp
nike max
nike x off white
yeezy boost 350
lebron 17 shoes
louboutin shoes
balenciaga shoes
Not only think about weekends and summer holidays, but national holidays like 4th of July in case of USA. afghani topi , antique choker necklace , neck embroidery patches , Afghani Style Shirt Handmade Embroidery
go to this web-site dolabuy hermes look at more info https://www.dolabuy.co click for info buy replica bags
Publicar un comentario