-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use Canary's ToolBox to get the time.
Also using updated UnoModding formatter.
- Loading branch information
1 parent
dc8df44
commit ccf97ac
Showing
8 changed files
with
45 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/main/java/unomodding/canary/playtimelimiter/exceptions/UnknownPlayerException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 3 additions & 10 deletions
13
src/main/java/unomodding/canary/playtimelimiter/utils/Timestamper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,15 @@ | ||
/** | ||
* Copyright 2013-2014 by ATLauncher and Contributors | ||
* Copyright 2013-2014 by UnoModding, ATLauncher and Contributors | ||
* | ||
* This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License. | ||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/. | ||
*/ | ||
package unomodding.canary.playtimelimiter.utils; | ||
|
||
import java.text.SimpleDateFormat; | ||
import java.util.Date; | ||
import net.canarymod.ToolBox; | ||
|
||
public final class Timestamper { | ||
private static final SimpleDateFormat format = new SimpleDateFormat("dd/M/yyy HH:mm:ss a"); | ||
|
||
public static String now() { | ||
return format.format(new Date()); | ||
} | ||
|
||
public static String was(Date date) { | ||
return format.format(date); | ||
return ToolBox.formatTimestamp(ToolBox.getUnixTimestamp()); | ||
} | ||
} |