Skip to content

Commit

Permalink
Use tweet_created_at timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
andylolz committed Jun 13, 2024
1 parent ce6a3fb commit 7a77d08
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions output/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Proposed [Twitter (X) community notes](https://x.com/i/communitynotes/download-d
<table id="notes-table" class="table table-striped" data-order='[[ 0, "desc" ]]'>
<thead>
<tr>
<th>Note created</th>
<th>Created</th>
<th>Tweet</th>
<th>Note(s)</th>
<th>Reason for note</th>
Expand Down Expand Up @@ -83,12 +83,18 @@ Proposed [Twitter (X) community notes](https://x.com/i/communitynotes/download-d
},
columns: [
{
data: 'notes',
data: 'tweet_created_at',
defaultContent: '',
render: function (data, type, row, meta) {
if (type !== 'display') {
return data[0]['created_at'];
return data;
}
if (data) {
dt = luxon.DateTime.fromISO(data).toFormat('d MMM yyyy');
} else {
dt = 'Unknown';
}
return '<a href="https://x.com/i/birdwatch/t/' + row['tweet_id'] + '" target="_blank">' + luxon.DateTime.fromISO(data[0]['created_at']).toFormat('d MMM yyyy') + '</a>';
return '<a href="https://x.com/i/birdwatch/t/' + row['tweet_id'] + '" target="_blank">' + dt + '</a>';
},
searchable: false
},
Expand Down

0 comments on commit 7a77d08

Please sign in to comment.