1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-12 09:35:26 +02:00

Time diff: Parse numbers as seconds

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1394 e251c2fe-e539-e718-e476-b85c1f46cddb
This commit is contained in:
snowleo
2011-05-09 19:51:53 +00:00
parent aedb0ecfce
commit ad504147a0

View File

@@ -106,7 +106,7 @@ public class Util
+ "(?:([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]*)?", Pattern.CASE_INSENSITIVE);
+ "(?:([0-9]+)\\s*(?:s[a-z]*)?)?", Pattern.CASE_INSENSITIVE);
public static long parseDateDiff(String time, boolean future) throws Exception
{