formatter
Class Timestamp

java.lang.Object
  extended by formatter.Timestamp

public class Timestamp
extends java.lang.Object

A time stamp is an hour, minute and second group representing the time.


Constructor Summary
Timestamp(int h, int m, int s)
          Makes a new Timestamp representing the time:
h : m : s
 
Method Summary
 java.lang.String getAMPM()
          Returns "AM" or "PM" depending on whether it's am or pm.
 int getHour12()
          Returns the hour in the 12-hour time system.
 int getHour24()
          Returns the hour in the 24-hour time system.
 int getMinute()
          Returns the minute of time.
 int getSecond()
          Returns the second in time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Timestamp

public Timestamp(int h,
                 int m,
                 int s)
Makes a new Timestamp representing the time:
h : m : s

Parameters:
h - Hour of the time.
m - Minute of the time.
s - Second of the time.
Method Detail

getHour12

public int getHour12()
Returns the hour in the 12-hour time system.

Returns:
A number in [1,12]

getHour24

public int getHour24()
Returns the hour in the 24-hour time system.

Returns:
A number in [0,23]

getMinute

public int getMinute()
Returns the minute of time.

Returns:
A number in [0,59]

getSecond

public int getSecond()
Returns the second in time.

Returns:
A number in [0,59]

getAMPM

public java.lang.String getAMPM()
Returns "AM" or "PM" depending on whether it's am or pm.

Returns:
"AM" or "PM"