I would like to code the Javascript line
date.toLocaleTimeString([], { hour: 'numeric', minute: '2-digit' });
in Kotlin. I can not figure out how to set the second parameter for which only an interface type LocaleOptions
exists. If I create an (anonymous) object then I have to initialize and use(!) all variables of interface LocaleOptions
but I only want to use hour
and minute
without displaying the other components.
[See my 2nd comment for a possible answer to this question!]