Most voted "jodatime" questions
Joda-time is a library that can be used in place of native Java date and time classes prior to Java 8 (java.util.Date and java.util.Calendar)
Learn more…8 questions
Sort by count of
-
28
votes2
answers3404
viewsHow do I migrate from Date and Calendar to the new Java 8 Date API?
Until Java 7, we had the classes Date and Calendar to represent dates. To convert them to Strings, the easiest way was with the use of SimpleDateFormat. Java 8 has introduced a new date API. How can…
-
12
votes1
answer1140
viewsWhy should I use Joda-Time or not?
The question comes mainly based on comment from one of our most active users today and who has already demonstrated extraordinary knowledge in time use, especially in Java. the java.time API would…
-
8
votes1
answer4355
viewsHow to calculate the difference between two dates by ignoring weekends in Java without using a loop
I was looking for a solution to this problem but I did not find a satisfactory algorithm, so I decided to create the algorithm. I hope it fits someone. public int betweenDaysIgnoreWeekends(DateTime…
-
3
votes3
answers54
viewsDate does not receive value more 30 days
I have a code that I want to check if the date is over 30 days with Jodatime, but putting in the console output the value is not assigned. I saw the following:…
-
2
votes1
answer855
viewsCompare Local time Joda Time
I have a comparison that checks whether the current time is after the time set. LocalTime horaConfig = new LocalTime(6, 00, 00); LocalTime horaAtual = new LocalTime(20, 00, 00);…
-
2
votes2
answers888
viewsWorking Hours Calculation - Java
How to calculate the working hours worked, for example, in the company if it works 540 minutes per day, in the system of orders of services I need to compute the hours of service executed, in this…
-
1
votes2
answers407
viewsHow to receive user date through Jtextfield, using Jodatime?
I am unable to do the user input. I want the program to make the difference of days between today’s date and the date typed by the user. The program has more implementations but it’s just this part…
-
0
votes1
answer471
viewsHandling Hours with Joda Time
String tempo1 = "01:30:30"; String tempo2 = "24:25:10"; SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss"); try { Date date1 = (Date)sdf.parse(tempo1); Date date2 = (Date)sdf.parse(tempo2);…