com.atlassian.jira.util
Class MeridianHour

java.lang.Object
  extended by com.atlassian.jira.util.MeridianHour

public final class MeridianHour
extends java.lang.Object

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


Constructor Summary
MeridianHour(int hour, java.lang.String meridian)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 int getHour()
           
 java.lang.String getMeridian()
           
 int hashCode()
           
static MeridianHour parseMeridianHour(java.lang.String twentyFourHour)
          Takes a 24 hour time and parses the 12 hour time with meridian indicator into a MeridianHour object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MeridianHour

public MeridianHour(int hour,
                    java.lang.String meridian)
Method Detail

getHour

public int getHour()

getMeridian

public java.lang.String getMeridian()

parseMeridianHour

public static MeridianHour parseMeridianHour(java.lang.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.

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object


Copyright © 2002-2010 Atlassian. All Rights Reserved.