InvoiceService.markOverdue needs the current date. The desired behavior is that an invoice due yesterday becomes overdue. The clock is awkward because real time changes; the date comparison itself is not the behavior you want to lock down.
Read the full lesson
Sign up free: one personalized lesson every day, matched to your role and goals.
Already have an account? Sign in