Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private double getBackgroundExpire(String command){
- command = command.replaceAll("y", "*31536000000+");
- command = command.replaceAll("mo", "*2628000000+");
- command = command.replaceAll("w", "*604800000+");
- command = command.replaceAll("d", "*86400000+");
- command = command.replaceAll("h", "*3600000+");
- command = command.replaceAll("m", "*60000+");
- command = command.replaceAll("s", "*1000+");
- command = command.substring(0, command.length()-1);
- Double ret = 0.0;
- ret = new Expression(command).resolve();
- //System.out.println(ret/1000);
- return ret;
- }
Advertisement
Add Comment
Please, Sign In to add comment