Questions tagged as 'jodatime'

1
answer

How to calculate the difference between two dates ignoring the weekends in Java without using 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. Hope it works for someone. public int betweenDaysIgnoreWeekends(DateTime startDate, DateTime endDate) { //Um nu...
asked by 29.08.2014 / 11:52
3
answers

Date does not receive value more than 30 days

I'm having a code that I want to check if the date is greater than 30 days with the JodaTime, but putting in the console output the value is not assigned. I have seen the following: link And I did the same idea, but it still did not work....
asked by 29.09.2017 / 17:19
2
answers

Calculating working hours - Java

How to calculate the working hours worked, for example, in the company if you work 540 minutes a day, in the order system of services I need to compute the hours of service performed, in this scenario: The work order was opened on 04/19/2017...
asked by 19.04.2017 / 15:43
1
answer

Compare current time Joda Time

I have a comparison that checks if the current time is after the configured time. LocalTime horaConfig = new LocalTime(6, 00, 00); LocalTime horaAtual = new LocalTime(20, 00, 00); horaAtual.isAfter(horaConfig); My problem is that since the...
asked by 12.09.2014 / 19:16
2
answers

How to receive user date through JTextField, using JodaTime?

I'm not able to do user input. I want the program to make the difference in days between today's date and the date entered by the user. The program has more implementations but it's just that part that is not working. private JTextField dataVe...
asked by 31.07.2016 / 07:36
1
answer

Time manipulation with Joda Time [duplicate]

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); DateTime date...
asked by 30.03.2016 / 02:16