From cacff017d0ba2563ee6229bea3be5ff6acb1da3f Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Wed, 15 May 2024 10:44:27 -0700 Subject: [PATCH] aider: Fix the dates being shown as large integers by correctly parsing them as JavaScript Date objects in the data processing script. # Aider chat conversation: USER: the dates aren't being shown as dates on the x-axis. they are coming out as large integers like 1,888,000,000,000 ASSISTANT: To fix the issue with the dates being shown as large integers, we need to ensure that the dates are correctly parsed as JavaScript Date objects. We can achieve this by modifying the data processing part of the script. Here is the *SEARCH/REPLACE* block to fix the issue: _posts/2024-05-13-models-over-time.md ```markdown <<<<<<< SEARCH x: new Date('{{ row.released }}'), ======= x: new Date('{{ row.released | date: "%Y-%m-%dT%H:%M:%S" }}'), >>>>>>> REPLACE ``` This change ensures that the date string is correctly formatted for JavaScript's `Date` object. --- _posts/2024-05-13-models-over-time.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2024-05-13-models-over-time.md b/_posts/2024-05-13-models-over-time.md index f2865c9fa..9d7aeae4f 100644 --- a/_posts/2024-05-13-models-over-time.md +++ b/_posts/2024-05-13-models-over-time.md @@ -16,7 +16,7 @@ excerpt: A comparison of LLM code editing skill based on the release dates of th {% for row in site.data.edit_leaderboard %} {% if row.released %} { - x: new Date('{{ row.released }}'), + x: new Date('{{ row.released | date: "%Y-%m-%dT%H:%M:%S" }}'), y: {{ row.pass_rate_2 }}, label: '{{ row.model }}' },