MCPcopy Create free account
hub / github.com/MenoData/Time4J / getFixedCode

Method getFixedCode

base/src/main/java/net/time4j/DayPeriod.java:496–510  ·  view source on GitHub ↗
(PlainTime time)

Source from the content-addressed store, hash-verified

494 }
495
496 private static String getFixedCode(PlainTime time) {
497
498 int minuteOfDay = time.get(PlainTime.MINUTE_OF_DAY).intValue();
499
500 if ((minuteOfDay == 0) || (minuteOfDay == 1440)) {
501 return "midnight";
502 } else if (minuteOfDay < 720) {
503 return "am";
504 } else if (minuteOfDay == 720) {
505 return "noon";
506 } else {
507 return "pm";
508 }
509
510 }
511
512 private static String createKey(
513 Map<String, String> textForms,

Callers 2

getValueMethod · 0.80
applyMethod · 0.80

Calls 1

getMethod · 0.65

Tested by

no test coverage detected