ConvertUtil

Functions

Link copied to clipboard
fun Double.round(decimals: Int): Double

Extension function to round numbers after the decimal point which can be customized

Link copied to clipboard

HH h MM m SS,ss s rounded to 2 digits after the decimal point function to change decimal data to HH h MM m SS,ss s format, rounding to 2 digits behind the comma, seconds rounded to minutes, minutes to hours

Link copied to clipboard
fun toCounterMMSS(decimal: Double): String

MM m SS s numbers rounded to seconds function to change double data to MM m SS s format seconds rounded to minutes

Link copied to clipboard

MM m SS,ss s rounded to 2 digits after the decimal point function to change decimal data to MM m SS,ss s format, rounded to 2 digits behind the comma, seconds rounded to minutes

Link copied to clipboard

DD° MM` SS,ss`` rounded to 2 decimal places function to change decimal data to DD° MM' SS,ss" format, seconds rounded to 2 digits after the decimal point, seconds rounded to minutes, minutes rounded to hours

Link copied to clipboard
fun toDegreeMMSS2(decimal: Double): String

MM` SS,ss`` rounded to 2 digits after the decimal point function to change decimal data to MM' SS,ss" format, seconds are rounded to 2 digits after the decimal point, seconds are rounded to minutes

Link copied to clipboard
fun toDegreeSS2(decimal: Double): String

function to change Double data to decimal unit form SS,ss

Link copied to clipboard
fun toNameDay(value: Int): String

convert number of day to day name 1 = Monday, 2 = Tuesday etc.

Link copied to clipboard
fun toNameMonth(number: Int): String

convert number of month to month name 1 = January, 2 = February etc.

Link copied to clipboard
fun toNamePasaran(value: Int): String

convert number of pasaran to pasaran name 1 = Legi, 2 = Pahing etc.

Link copied to clipboard

HH:MM:SS numbers rounded to seconds function to change Double data to hours, minutes, seconds of type Int Array index 0 : hours, index 1 : minutes, index 2 : seconds

Link copied to clipboard

HH:MM:SS,ss rounded to 2 digits after the decimal point function to change decimal data to HH:MM:SS,ss format, rounded to 2 digits behind the comma, seconds rounded to minutes, minutes rounded to hours

Link copied to clipboard

HH:MM:SS numbers rounded to seconds function to change Double data to HH:MM:SS format, seconds rounded to minutes, minutes rounded to hours