File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
src/main/java/io/github/syst3ms/skriptparser/util Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 1212import java .util .TimeZone ;
1313
1414public class SkriptDate implements Comparable <SkriptDate > {
15- // TODO make a config for this
16- public final static String DATE_FORMAT = "EEEE dd MMMM yyyy HH:mm:ss.SSS" ; // Add 'zzzXXX' to display time zone as well
15+ public static String DATE_FORMAT = "EEEE dd MMMM yyyy HH:mm:ss.SSS" ; // Add 'zzzXXX' to display time zone as well
1716 public final static Locale DATE_LOCALE = Locale .US ;
1817
1918 private static final TimeZone defaultTimeZone = TimeZone .getDefault ();
@@ -93,6 +92,10 @@ public static TimeZone getDefaultTimeZone() {
9392 return defaultTimeZone ;
9493 }
9594
95+ public static void setDefaultDateFormat (String format ) {
96+ DATE_FORMAT = format ;
97+ }
98+
9699 /**
97100 * @return the amount of milliseconds that have passed
98101 * since midnight, January 1st, 1970 in the UTC time zone
Original file line number Diff line number Diff line change 1515 * @author Mwexim
1616 */
1717public class Time implements Comparable <Time > {
18- // TODO make a config for this
19- public final static String TIME_FORMAT = "HH:mm:ss.SSS" ;
18+ public static String TIME_FORMAT = "HH:mm:ss.SSS" ;
2019 public final static Locale TIME_LOCALE = Locale .US ;
2120
2221 /**
@@ -85,6 +84,10 @@ public static Time of(SkriptDate date) {
8584 return new Time (lcd .toLocalTime ());
8685 }
8786
87+ public static void setDefaultTimeFormat (String format ) {
88+ TIME_FORMAT = format ;
89+ }
90+
8891 /**
8992 * Parses a given string as a time, using one of the three patterns.
9093 *
You can’t perform that action at this time.
0 commit comments