There are couple of listings and they have an end date set with them . I actually wanted to create a seperate route for the archived section, so basically whichever listing crosses the end date they must be shown in archived section
this is the main route which shows all the listings
<div class="container">
<div class="row allcards mt-4">
<% for(let listing of allListings){%>
<div class="card p-3 justify-center items-center" style="width: 18rem">
<div class="card-body">
<a href="/listings/<%= listing._id %>" class="listing-link">
<h5 class="card-title"><%= listing.title%></h5>
<p class="card-text">
current installment: <span id="input" value=""></span> <br />
<span id="targetDate"
>commenced month: <%= listing.startDate ?
listing.startDate.toLocaleDateString() : "N/A" %></span
>
</p>
</a>
</div>
</div>
<%}%>
</div>
</div>