Skip to content

Commit

Permalink
Flattening to 0 negative contributions (withdrawals) (#793)
Browse files Browse the repository at this point in the history
Co-authored-by: Johannes Müller <[email protected]>
  • Loading branch information
beta-ziliani and straight-shoota authored May 24, 2024
1 parent 44bc158 commit 1e4b127
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/merge.cr
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,12 @@ def write_csv(filename, sponsors)
sponsors.each do |sponsor|
currency = sponsor.currency || "$"

last_payment = sponsor.last_payment.to_i

csv.row sponsor.logo,
sponsor.name,
sponsor.url,
"#{currency}#{sponsor.last_payment.to_i.format}",
"#{currency}#{last_payment.clamp(0..).format}",
"#{currency}#{sponsor.all_time.to_i.format}",
sponsor.since.to_s("%b %-d, %Y"),
level(sponsor)
Expand Down

0 comments on commit 1e4b127

Please sign in to comment.