public final class

MeridianHour

extends Object
java.lang.Object
   ↳ com.atlassian.jira.util.MeridianHour

Class Overview

Holder of a 12 hour time with a meridian indicator (am/pm).

Summary

Public Constructors
MeridianHour(int hour, String meridian)
Public Methods
boolean equals(Object o)
int getHour()
String getMeridian()
int hashCode()
static MeridianHour parseMeridianHour(String twentyFourHour)
Takes a 24 hour time and parses the 12 hour time with meridian indicator into a MeridianHour object.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public MeridianHour (int hour, String meridian)

Public Methods

public boolean equals (Object o)

public int getHour ()

public String getMeridian ()

public int hashCode ()

public static MeridianHour parseMeridianHour (String twentyFourHour)

Takes a 24 hour time and parses the 12 hour time with meridian indicator into a MeridianHour object.

Be aware that 12:00 is 12pm (noon), 00:00 is 12am and 24:00 doesn't exist.

Parameters
twentyFourHour a time value in 24 hour format ("0" - "23").
Returns
  • a MeridianHour representing the given time or null on arse failure.