Format views for billions

This commit is contained in:
Brahim Hadriche committed 2023-02-14 16:28:32 -05:00
1 parent 0de521c525
commit d1cb877784
1 file changed
+6 -1
@@ -87,7 +87,12 @@ function FormatViewCount(viewCount as dynamic) as string
end if
viewCount = viewCount / 1000
return `${FormatFloat(viewCount)}M views`
if viewCount < 1000
return `${FormatFloat(viewCount)}M views`
end if
viewCount = viewCount / 1000
return `${FormatFloat(viewCount)}B views`
end function
function FormatFloat(X as integer) as integer