Skip to content
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.

Commit

Permalink
TimeFormat: add weeks
Browse files Browse the repository at this point in the history
  • Loading branch information
TheFaser committed Jul 31, 2023
1 parent 237f013 commit 948642f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/java/net/flectone/custom/FCommands.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
public class FCommands {

public static final HashMap<String, Integer> commandsCDMap = new HashMap<>();
public final static String[] formatTimeList = {"s", "m", "h", "d", "y"};
public final static String[] formatTimeList = {"s", "m", "h", "d", "w", "y"};
private final FileManager locale = Main.locale;
private final String command;
private final String[] args;
Expand Down Expand Up @@ -302,7 +302,9 @@ public int getTimeFromString(String string) {

switch (string) {
case "y":
time *= 30 * 12;
time *= 4 * 12 + 4;
case "w":
time *= 7;
case "d":
time *= 24;
case "h":
Expand Down

0 comments on commit 948642f

Please sign in to comment.