Last active
August 13, 2016 10:17
-
-
Save travisdachi/bf9c8333da87af27b82e3f5a927ab22d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun Date.formatFancy(): String { | |
val myFancyFormat = ... | |
val f = SimpleDateFormat(myFancyFormat) | |
return f.format(this) | |
} | |
// fun <receiverType>.<functionName>(): <returnType> | |
someDate.formatFancy() //call within Kotlin | |
MyExtnsionsKt.formatFancy(someDate); //call from Java | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment