mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-06 11:00:43 +01:00
midnight = 12am
noon = 12pm
This commit is contained in:
parent
bb32ec9567
commit
5de354af86
@ -155,10 +155,6 @@ public final class DescParseTickFormat
|
||||
|
||||
int hours = 0;
|
||||
int minutes = 0;
|
||||
if (desc.endsWith("pm"))
|
||||
{
|
||||
hours += 12;
|
||||
}
|
||||
|
||||
desc = desc.toLowerCase().replaceAll("[^0-9]", "");
|
||||
|
||||
@ -190,6 +186,16 @@ public final class DescParseTickFormat
|
||||
throw new NumberFormatException();
|
||||
}
|
||||
|
||||
if (desc.endsWith("pm") && hours != 12)
|
||||
{
|
||||
hours += 12;
|
||||
}
|
||||
|
||||
if (desc.endsWith("am") && hours == 12)
|
||||
{
|
||||
hours -= 12;
|
||||
}
|
||||
|
||||
return hoursMinutesToTicks(hours, minutes);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user