Format views for billions
This commit is contained in:
1 parent
0de521c525
commit
d1cb877784
1 file changed
+6
-1
@@ -87,7 +87,12 @@ function FormatViewCount(viewCount as dynamic) as string
|
|||||||
end if
|
end if
|
||||||
|
|
||||||
viewCount = viewCount / 1000
|
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
|
end function
|
||||||
|
|
||||||
function FormatFloat(X as integer) as integer
|
function FormatFloat(X as integer) as integer
|
||||||
|
|||||||
Reference in new issue
Block a user