Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Morten Haraldsen committed Jan 29, 2024
1 parent 9e76a09 commit d7f4c30
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 0 additions & 5 deletions src/main/java/com/ethlo/time/DateTime.java
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,6 @@ private static void leapSecondCheck(int year, int month, int day, int hour, int
}
}

public static DateTime ofNanos(int year, int month, int day, int hour, int minute, int second, int nanos, TimezoneOffset timezoneOffset, int fractionDigits, int charLength)
{
return new DateTime(fractionDigits > 0 ? Field.NANO : Field.SECOND, year, month, day, hour, minute, second, nanos, timezoneOffset, fractionDigits, charLength);
}

/**
* Returns if the specified field is part of this date/date-time
*
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/ethlo/time/internal/EthloITU.java
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ private static DateTime handleFractionalSeconds(int offset, ParseConfig parseCon
final TimezoneOffset timezoneOffset = parseTimezone(offset, parseConfig, chars, idx);
final int charLength = (idx + (timezoneOffset != null ? timezoneOffset.getRequiredLength() : 0)) - offset;
final int second = parsePositiveInt(chars, offset + 17, offset + 19);
return DateTime.ofNanos(year, month, day, hour, minute, second, nanos, timezoneOffset, fractionDigits, charLength);
return new DateTime(Field.NANO, year, month, day, hour, minute, second, nanos, timezoneOffset, fractionDigits, charLength);
}

private static void assertFractionDigits(String chars, int fractionDigits, int idx)
Expand Down

0 comments on commit d7f4c30

Please sign in to comment.