Skip to content

Commit

Permalink
Fix donation sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
nzakas committed Sep 6, 2024
1 parent 19393c5 commit f9182f7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tools/fetch-sponsors.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ const knownOneTimers = new Set([
"GitHub Sponsors",
"Read the Docs",
"BuySellAds",
"EthicalAds",
"Threadless",
]);

// we must have a token for this to work
Expand Down Expand Up @@ -395,7 +397,7 @@ async function fetchGitHubSponsors() {
const donations = openCollectiveDonations.concat(githubDonations);

// sort donations so most recent is first
donations.sort((a, b) => new Date(a) - new Date(b));
donations.sort((a, b) => Date.parse(b.date) - Date.parse(a.date));

// simplified data structure
const tierSponsors = {
Expand Down

0 comments on commit f9182f7

Please sign in to comment.