Fixed hour pattern for multi file per day.

This commit is contained in:
Christian P. MOMON 2018-05-19 00:18:31 +02:00
parent 437ebda8af
commit 47a92976f8
1 changed files with 2 additions and 2 deletions

View File

@ -361,7 +361,7 @@ public class Hebdobot extends PircBot
if (reviewFile.exists())
{
LocalTime now = LocalTime.now();
String newSuffix = String.format("-%02d'h'%02d.txt", now.getHour(), now.getMinute());
String newSuffix = String.format("-%02dh%02d.txt", now.getHour(), now.getMinute());
reviewFile = new File(reviewFile.getAbsolutePath().replace(".txt", newSuffix));
}
try
@ -596,7 +596,7 @@ public class Hebdobot extends PircBot
logger.info("!date caught.");
// Date command.
sendMessage(LocalDateTime.now().format(DateTimeFormatter.ofPattern("EEEE dd MMMM yyyy kk'h'mm", Locale.FRENCH)));
sendMessage(LocalDateTime.now().format(DateTimeFormatter.ofPattern("EEEE dd MMMM yyyy HH'h'mm", Locale.FRENCH)));
}
else if (StringsUtils.equalsAnyIgnoreCase(text, "!stats"))
{