SimpleDate
SimpleDate is a Kotlin Library which helps you format the date as per your requirement.
Getting Started
In project-level build.gradle
:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
dependencies {
implementation 'com.github.sidhuparas:SimpleDate:<latest-version>'
}
Version 2.0+ Backward Incompatible
SimpleDate
uses Kotlin Extension Functions since Version 2.0. This makes it incompatible with the older versions of the library. But thanks to extension functions, the API looks very clean on Kotlin as well as Java.
Usage
You can use the methods on a date object. Following are the available functions:
For Date and Time
For Time Only
For Date Only
For Day Only
Examples
- Kotlin:
- Java: