Kotlin extension functions for korean-lunar-calendar.
Provides various Kotlin extension functions against KoreanLunarDate for better code readibility.
In Java, for example, if you want to convert KoreanLunarDate
to java.util.Date
, the code would be like:
import com.github.fj.koreanlunarcalendar.KoreanLunarCalendarUtils;
final Date gregorianDate = KoreanLunarCalendarUtils.toGregorianDate(lunarDate);
which functions correctly but seems unnatural as compare to human expression. In Kotlin, however:
import com.github.fj.koreanlunarcalendar.asGregorianDate
val gregorianDate = lunarDate.asGregorianDate()
is possible thanks for extension function feature.
Java 1.6+, all Android versions
You must install jitpack.io plugin to your build script in order to import this project.
dependencies {
implementation "com.github.FrancescoJo:korean-lunar-calendar-ktext:1.0"
}
<dependency>
<groupId>com.github.FrancescoJo</groupId>
<artifactId>korean-lunar-calendar-ktext</artifactId>
<version>1.0</version>
</dependency>
See KoreanLunarCalendar documentation.
This code is under the Apache Licence v2.