I'm trying to calculate the amount of time spent sleeping throughout two periods of time.
There's six spinners - bDay, tDay, tMonth, bMonth, tYear, bYear.
Each day is 8hours, and it takes the time between the birth date and current date provided.
private void calculateActionPerformed(java.awt.event.ActionEvent evt){
int year = 365;
// for day in year, sleep += 8. 30 days per month.
// bDay.getValue() can't be converted to int?
javax.swing.JOptionPane.showMessageDialog(null, "You have slept approximately: \n Days\n Months \n Years", "SleepCalculator", 1);
}
I'm struggling to figure out how to calculate the time between and I don't know how to convert the values to integers