Skip to content

Commit

Permalink
Use default locale instead of hardcoded US locale (#1763)
Browse files Browse the repository at this point in the history
  • Loading branch information
Slartibartfass2 committed Aug 18, 2023
1 parent b2fc79a commit 334dabb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class BarCardView(context: Context, attrs: AttributeSet) : LinearLayout(context,

fun setState(state: BarCardState) {
val androidColor = state.theme.color(state.color).toInt()
binding.chart.view = BarChart(state.theme, JavaLocalDateFormatter(Locale.US)).apply {
binding.chart.view = BarChart(state.theme, JavaLocalDateFormatter(Locale.getDefault())).apply {
series = mutableListOf(state.entries.map { it.value / 1000.0 })
colors = mutableListOf(theme.color(state.color.paletteIndex))
axis = state.entries.map { it.timestamp.toLocalDate() }
Expand Down

0 comments on commit 334dabb

Please sign in to comment.