DecimalUtils - remove unused methods converting between Instance and BigDecimal

This commit is contained in:
Rob Bygrave committed 2022-08-26 12:24:15 +12:00
1 parent 5667f1b118
commit 13a913428e
2 files changed
+8 -25

No files matched your search

@@ -61,16 +61,6 @@ final class DecimalUtils {
return new BigDecimal(toDecimal(secs, instant.getNanos()));
}
static Instant toInstant(BigDecimal value) {
long seconds = value.longValue();
int nanoseconds = extractNanosecondDecimal(value, seconds);
return Instant.ofEpochSecond(seconds, nanoseconds);
}
static BigDecimal toDecimal(Instant instant) {
return new BigDecimal(toDecimal(instant.getEpochSecond(), instant.getNano()));
}
static String toDecimal(long seconds, int nanoseconds) {
StringBuilder string = new StringBuilder(Integer.toString(nanoseconds));
if (string.length() < 9)