Skip to content

Commit

Permalink
typo on moment formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
sisby-folk committed Jul 27, 2024
1 parent 38c601c commit da0da0a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ org.gradle.configureondemand=true
# Enable advanced multi-module optimizations (share tiny-remaper instance between projects)
fabric.loom.multiProjectOptimisation=true
# Mod Properties
baseVersion = 0.4.1
baseVersion = 0.4.2
branch = 1.21
7 changes: 4 additions & 3 deletions src/main/java/net/modfest/ballotbox/BallotBox.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@ public static String relativeTime(Instant then) {
long days = TimeUnit.MILLISECONDS.toDays(Math.abs(offset));
if (days > 0) return (offset > 0 ? "%s days ago" : "in %s days").formatted(days);
long hours = TimeUnit.MILLISECONDS.toHours(Math.abs(offset));
if (hours > 0) return (offset > 0 ? "%s hours ago" : "in %s hours").formatted(days);
if (hours > 0) return (offset > 0 ? "%s hours ago" : "in %s hours").formatted(hours);
long minutes = TimeUnit.MILLISECONDS.toMinutes(Math.abs(offset));
if (minutes > 0) return (offset > 0 ? "%s minutes ago" : "in %s minutes").formatted(days);
return (offset > 0 ? "%s seconds ago" : "in %s seconds").formatted(TimeUnit.MILLISECONDS.toSeconds(offset));
if (minutes > 0) return (offset > 0 ? "%s minutes ago" : "in %s minutes").formatted(minutes);
long seconds = TimeUnit.MILLISECONDS.toSeconds(offset);
return (offset > 0 ? "%s seconds ago" : "in %s seconds").formatted(seconds);
}

public static boolean isEnabled(MinecraftServer server) {
Expand Down

0 comments on commit da0da0a

Please sign in to comment.