I would like to display the deadline date if it is today or in the future and the word 'Closed' if the date has passed.
I have the following code which is working APART from when the deadline and today's date are the same.
HTML
<div class="deadline-inner">
<p
v-if="Date.now() > new Date(deadline)"
class="showclosedtitle"
>
<i class="fa fa-calendar-check-o" aria-hidden="true"></i>Closed
</p>
<p v-else>
<i class="fa fa-calendar-check-o" aria-hidden="true"></i>
<strong>Deadline: </strong>{{ deadline }}
</p>
</div>
The deadline is in this format: "21 December 2021"
I have also tried:
v-if="Date.now() >= new Date(deadline)"
v-if="Date.now() > +1 new Date(deadline)"
but all of them show the 'else' part of the statement if the deadline and today's date are the same. Any help is appreciated.