Skip to content

Commit 70841db

Browse files
litetexStypox
authored andcommitted
Cleanup Localization formatting
1 parent 859555e commit 70841db

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

app/src/main/java/org/schabi/newpipe/util/Localization.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,13 @@ public static String localizeNumber(final long number) {
127127
}
128128

129129
public static String localizeNumber(final double number) {
130-
final NumberFormat nf = NumberFormat.getInstance(getAppLocale());
131-
return nf.format(number);
130+
return NumberFormat.getInstance(getAppLocale()).format(number);
132131
}
133132

134133
public static String formatDate(@NonNull final OffsetDateTime offsetDateTime) {
135134
return DateTimeFormatter.ofLocalizedDate(FormatStyle.MEDIUM)
136-
.withLocale(getAppLocale()).format(offsetDateTime
137-
.atZoneSameInstant(ZoneId.systemDefault()));
135+
.withLocale(getAppLocale())
136+
.format(offsetDateTime.atZoneSameInstant(ZoneId.systemDefault()));
138137
}
139138

140139
@SuppressLint("StringFormatInvalid")

0 commit comments

Comments
 (0)