From e06045dafa80a4bb2bcf253212060a32d0dbf81a Mon Sep 17 00:00:00 2001 From: vsoch Date: Thu, 21 Sep 2023 15:36:09 -0600 Subject: [PATCH] fixing jobs rendering with expire date problem: not all jobs are showing up solution: the bug is inconsitent rendering of the expires date, which depending on how it is provided can be rendered correctly as a timestamp, or if jekyll cannot, it falls back to a date format that cannot pass the comparison. In practice this results in a lot of missing jobs, and introduces potential for many errors. A better solution is to rely on what we already have, parsing the dates and expires in the python automation, and then allowing for 60 days of buffer (so jobs are shown that go 60 days back). To allow for this we have updated the "Expires" heading to be "Advertised until" Signed-off-by: vsoch --- _includes/jobrows.html | 6 ++---- pages/index.md | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/_includes/jobrows.html b/_includes/jobrows.html index 2af81a7..9fbdcd5 100755 --- a/_includes/jobrows.html +++ b/_includes/jobrows.html @@ -1,11 +1,9 @@ {% capture jobs_data %} {% for job in include.sorted_jobs %} - {% capture nowunix %}{{'now' | date: '%s'}}{% endcapture %} - {% capture expires %}{{ job.expires | date: "%m/%d/%Y" | date: '%s'}}{% endcapture %} + {% capture nowunix %}{{'now' | date: '%m/%d/%Y' | date: %s }}{% endcapture %} {% capture posted %}{{ job.posted | date: "%m/%d/%Y" | date: '%b %d, %Y'}}{% endcapture %} {% capture posted_order %}{{ job.posted | date: "%m/%d/%Y" | date: '%Y%m%d'}}{% endcapture %} {% capture expires_order %}{{ job.expires | date: "%m/%d/%Y" | date: '%Y%m%d'}}{% endcapture %} - {% if expires > nowunix %} {{ job.title }} {{ job.job_type }} @@ -15,7 +13,7 @@ {{ job.posted }} {{ job.remote }} - {% endif %}{% endfor %} + {% endfor %} {% endcapture %} {% comment %} This accounts for the way whitespace appears in diff --git a/pages/index.md b/pages/index.md index 1bf65fc..d3643d9 100755 --- a/pages/index.md +++ b/pages/index.md @@ -65,7 +65,7 @@ permalink: / Job Type Employer Location - Expires + Advertised Until Posted Remote Options