[stdlib] Remove unused kotlin.time.formatUpToDecimals
This commit is contained in:
committed by
Space Team
parent
1e9bc1abc7
commit
2d08953c91
@@ -27,7 +27,3 @@ internal actual fun formatToExactDecimals(value: Double, decimals: Int): String
|
||||
if (rounded < 0) "-$positiveString" else positiveString
|
||||
}
|
||||
}
|
||||
|
||||
internal actual fun formatUpToDecimals(value: Double, decimals: Int): String {
|
||||
return value.asDynamic().toLocaleString("en-us", json("maximumFractionDigits" to decimals)).unsafeCast<String>()
|
||||
}
|
||||
|
||||
@@ -25,8 +25,3 @@ internal actual fun formatToExactDecimals(value: Double, decimals: Int): String
|
||||
createFormatForDecimals(decimals)
|
||||
return format.format(value)
|
||||
}
|
||||
|
||||
internal actual fun formatUpToDecimals(value: Double, decimals: Int): String =
|
||||
createFormatForDecimals(0)
|
||||
.apply { maximumFractionDigits = decimals }
|
||||
.format(value)
|
||||
|
||||
@@ -1491,4 +1491,3 @@ private fun durationOfMillisNormalized(millis: Long) =
|
||||
internal expect val durationAssertionsEnabled: Boolean
|
||||
|
||||
internal expect fun formatToExactDecimals(value: Double, decimals: Int): String
|
||||
internal expect fun formatUpToDecimals(value: Double, decimals: Int): String
|
||||
|
||||
@@ -34,6 +34,3 @@ internal actual fun formatToExactDecimals(value: Double, decimals: Int): String
|
||||
if (rounded < 0) "-$positiveString" else positiveString
|
||||
}
|
||||
}
|
||||
|
||||
internal actual fun formatUpToDecimals(value: Double, decimals: Int): String =
|
||||
js("(value, decimals) => value.toLocaleString(\"en-us\", ({\"maximumFractionDigits\": decimals}))")
|
||||
@@ -14,6 +14,4 @@ internal actual fun formatToExactDecimals(value: Double, decimals: Int): String
|
||||
return (round / pow).toString()
|
||||
}
|
||||
|
||||
internal actual fun formatUpToDecimals(value: Double, decimals: Int): String = TODO("Wasi Implement")
|
||||
|
||||
internal actual inline val durationAssertionsEnabled: Boolean get() = true
|
||||
Reference in New Issue
Block a user