title: Java Instance Calculate Duration between the Instant
body: <pre><code>public class Student {
      String firstName;
      String secondName;
      Instant lastClassAttendedOn;
  }
  </code></pre>
  <p>Hi, I have been stuck on a problem where I have the list of students and I want to find out all the students who have attended at least one class in the previous week. By previous week, I mean from the previous week Monday to the previous week Friday as the school has a holiday on Saturday and Sunday. I might be checking the list any day of the week for example On Wednesday so I should get all the students who have taken at least a class in previous week</p>