Finish the API

This commit is contained in:
Zontreck 2024-02-16 14:56:33 -07:00
parent 2603e7510b
commit 9b56f12ae6
2 changed files with 15 additions and 1 deletions

View file

@ -2,7 +2,6 @@ package dev.zontreck.ariaslib.util;
import java.io.PrintStream; import java.io.PrintStream;
@Deprecated
public class Percent public class Percent
{ {
int current; int current;

View file

@ -55,6 +55,21 @@ public class TimeUtil
return new TimeNotation(years, month, week, day, hour, minute, seconds); return new TimeNotation(years, month, week, day, hour, minute, seconds);
} }
public static int notationToSeconds(TimeNotation notation)
{
int seconds = 0;
seconds += (notation.Years * YEAR);
seconds += (notation.Months * MONTH);
seconds += (notation.Weeks * WEEK);
seconds += (notation.Days * DAY);
seconds += (notation.Hours * HOUR);
seconds += (notation.Minutes * MINUTE);
seconds += (notation.Seconds);
return seconds;
}
public static final int SECOND; public static final int SECOND;
public static final int MINUTE; public static final int MINUTE;