Updated TimeUtil
This commit is contained in:
parent
d30780e06e
commit
bcc04e6174
@ -12,7 +12,7 @@ import java.util.regex.Pattern;
|
||||
* Creation Date: 1/30/2020
|
||||
*/
|
||||
public class TimeUtil {
|
||||
|
||||
|
||||
public static long parseDateDiff(String time, boolean future) throws Exception {
|
||||
Pattern timePattern = Pattern.compile("(?:([0-9]+)\\s*y[a-z]*[,\\s]*)?(?:([0-9]+)\\s*mo[a-z]*[,\\s]*)?(?:([0-9]+)\\s*w[a-z]*[,\\s]*)?(?:([0-9]+)\\s*d[a-z]*[,\\s]*)?(?:([0-9]+)\\s*h[a-z]*[,\\s]*)?(?:([0-9]+)\\s*m[a-z]*[,\\s]*)?(?:([0-9]+)\\s*(?:s[a-z]*)?)?", 2);
|
||||
Matcher m = timePattern.matcher(time);
|
||||
|
@ -2,7 +2,7 @@ name: Factions
|
||||
version: ${project.version}
|
||||
api-version: 1.13
|
||||
main: com.massivecraft.factions.FactionsPlugin
|
||||
authors: [Olof Larsson, Brett Flannigan, drtshock, ProSavage, SvenjaReißaus, FroggyKnight, Driftay]
|
||||
authors: [Olof Larsson, Brett Flannigan, drtshock, ProSavage, SvenjaReißaus, Driftay]
|
||||
softdepend: [Skript, CoreProtect, PlayerVaults, PlaceholderAPI, MVdWPlaceholderAPI, PermissionsEx, Permissions, Essentials, EssentialsChat, HeroChat, iChat, LocalAreaChat, LWC, nChat, ChatManager, CAPI, AuthMe, Vault, Spout, WorldEdit, WorldGuard, AuthDB, CaptureThePoints, CombatTag, dynmap, FactionsTop]
|
||||
|
||||
commands:
|
||||
|
Loading…
Reference in New Issue
Block a user