Skip to content

Commit

Permalink
fix: minor fixes with conversion of types
Browse files Browse the repository at this point in the history
  • Loading branch information
lvca committed Apr 30, 2024
1 parent 7509e4b commit 4e58b82
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ else if (result.fitsInLong())
else if (result.fitsInFloat())
return result.asFloat();
else
return result.asFloat();
return result.asDouble();
} else if (result.isNull())
return null;

Expand Down
4 changes: 2 additions & 2 deletions engine/src/main/java/com/arcadedb/utility/DateUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -344,8 +344,8 @@ public static LocalDate millisToLocalDate(final long millis) {
}

public static String format(final Object obj, final String format) {
if (obj instanceof Long)
return getFormatter(format).format(millisToLocalDateTime((Long) obj));
if (obj instanceof Number)
return getFormatter(format).format(millisToLocalDateTime(((Number) obj).longValue()));
else if (obj instanceof Date)
return getFormatter(format).format(millisToLocalDateTime(((Date) obj).getTime()));
else if (obj instanceof Calendar)
Expand Down

0 comments on commit 4e58b82

Please sign in to comment.