Skip to content

Commit

Permalink
detekt fix Ivy-Apps#1
Browse files Browse the repository at this point in the history
  • Loading branch information
nvllz committed Jan 21, 2024
1 parent 1de8879 commit e8cc65c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import com.ivy.legacy.utils.withDayOfMonthSafe
import java.time.LocalDate
import java.time.LocalDateTime

private const val MONTH_NAME_ABBREVIATION_LENGTH = 3

@Immutable
data class TimePeriod(
val month: Month? = null,
Expand Down Expand Up @@ -169,7 +171,7 @@ data class TimePeriod(
val year = year
return if (year != null && dateNowUTC().year != year) {
// not this year
"${month.name.substring(0, 3)}, $year"
"${month.name.substring(0, MONTH_NAME_ABBREVIATION_LENGTH)}, $year"
} else {
// this year
month.name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.width
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
Expand Down

0 comments on commit e8cc65c

Please sign in to comment.