Can I compare the current date on my device to a one entered in a date picker

Can I know the gap between the current date and one that I have picked in a DatePicker, example, the current day is 14 and I picked 10 and it shows that 4 days have passed, can I do that?

You could adapt this using the datepicker.

Here I selected 10/01/2026 in the datepicker and clock1.now returns 14/01/2026


I think I did something wrong but what I wanna do is when I select a date and it was say, 4 days ago, it makes "test' visible.