We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 447e198 commit ffef5b1Copy full SHA for ffef5b1
presentation/src/main/java/com/threegap/bitnagil/presentation/writeroutine/model/Date.kt
@@ -11,11 +11,14 @@ data class Date(
11
val day: Int,
12
) : Parcelable {
13
companion object {
14
- fun now() = Date(
15
- year = LocalDate.now().year,
16
- month = LocalDate.now().monthValue,
17
- day = LocalDate.now().dayOfMonth,
18
- )
+ fun now(): Date {
+ val currentDate = LocalDate.now()
+ return Date(
+ year = currentDate.year,
+ month = currentDate.monthValue,
19
+ day = currentDate.dayOfMonth,
20
+ )
21
+ }
22
23
fun min(d1: Date, d2: Date): Date {
24
if (d1.year < d2.year) return d1
0 commit comments