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