Jan 29, 2023
While this works, this is going to perform absolutely terribly if you use these extension functions in something like a recyclerview's binding.
SimpleDateFormat's constructor is a beast and attempting to reuse the resulting constructed object is also not thread safe.
SimpleDateFormat is an ancient Java API with a huge number of issues. I strongly recommend people use the more modern java 8 time APIs instead, or the Kotlin variants if that's your thing.