ProgramixGenericLib v5.0.1

Class DateTimeField

  extended by com.programix.time.DateTimeField
All Implemented Interfaces:

public final class DateTimeField
extends Object
implements Serializable

Used to specify a field in a date/time for the Gregorian calendar. See each of the fields defined for specifics: YEAR, MONTH, DAY, HOUR, MINUTE, SECOND, and MILLISECOND.

Paul Hyde
See Also:
Serialized Form

Field Summary
static DateTimeField DAY
          The day [date] of the month.
static DateTimeField HOUR
          The hour of the day in 24-hour format.
static DateTimeField MILLISECOND
          The millisecond of the second.
static DateTimeField MINUTE
          The minute of the hour.
static DateTimeField MONTH
          The month of the year.
static DateTimeField SECOND
          The second of the minute.
static DateTimeField YEAR
          The 4-digit year.
Constructor Summary
DateTimeField(int code, String name)
Method Summary
 boolean equals(Object obj)
          Use this method instead of == to be sure that serialization or multiple class loaders have not resulted in multiple instances.
 String getName()
          Returns the name of this anchor.
static DateTimeField[] getValues()
          Returns an array of all the legal values.
 int hashCode()
 String toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail


public static final DateTimeField YEAR
The 4-digit year. The field holding 2004 in 2004-12-19 15:45:52.809.


public static final DateTimeField MONTH
The month of the year. The field holding 12 in 2004-12-19 15:45:52.809.


public static final DateTimeField DAY
The day [date] of the month. The field holding 19 in 2004-12-19 15:45:52.809.


public static final DateTimeField HOUR
The hour of the day in 24-hour format. The field holding 15 in 2004-12-19 15:45:52.809.


public static final DateTimeField MINUTE
The minute of the hour. The field holding 45 in 2004-12-19 15:45:52.809.


public static final DateTimeField SECOND
The second of the minute. The field holding 52 in 2004-12-19 15:45:52.809.


public static final DateTimeField MILLISECOND
The millisecond of the second. The field holding 809 in 2004-12-19 15:45:52.809.

Constructor Detail


public DateTimeField(int code,
                     String name)
Method Detail


public String getName()
Returns the name of this anchor. For example: "NORTH", "CENTER", etc.


public boolean equals(Object obj)
Use this method instead of == to be sure that serialization or multiple class loaders have not resulted in multiple instances.

equals in class Object


public int hashCode()
hashCode in class Object


public String toString()
toString in class Object


public static DateTimeField[] getValues()
Returns an array of all the legal values. A cloned copy is returned, so no caution in how the array is used by the caller is required.

ProgramixGenericLib v5.0.1

Copyright © 2001-2009 Programix Incorporated. All rights reserved. ProgramixGenericLib is free and is OSI Certified Open Source Software under the BSD license.