public class DateRecord extends Date
Constructor and Description |
---|
DateRecord()
Initialize DateExt object with default value.
|
Modifier and Type | Method and Description |
---|---|
boolean |
calcDate(Date date,
boolean strict)
calcDate uses all the field available so far to fill a Date object.
|
void |
setAmbiguousYear(boolean ambiguousYear)
Set ambiguous year field.
|
void |
setAmpm(int ampm)
Set morning/afternoon field.
|
void |
setDayOfMonth(int day)
Set dayOfMonth field.
|
void |
setDayOfWeek(int dayOfWeek)
Set dayOfWeek field.
|
void |
setEra(int era)
Set Era field.
|
void |
setHours(int hours)
Set hour field.
|
void |
setMidnightIs24(boolean midnightIs24)
Set midnightIs24 field.
|
void |
setMilliseconds(int milliseconds)
Set milliseconds field.
|
void |
setMinutes(int minutes)
Set minute field.
|
void |
setMonth(int month)
Set month field.
|
void |
setSeconds(int seconds)
Set seconds field.
|
void |
setTzOffset(int tzOffset)
Set timezone offset, in minutes.
|
void |
setYear(int value)
Set year field.
|
after, before, clone, compareTo, equals, getDate, getDay, getHours, getMinutes, getMonth, getSeconds, getTime, getTimezoneOffset, getYear, hashCode, padTwo, parse, setDate, setTime, toGMTString, toLocaleString, toString, UTC
public static final int AM
public static final int PM
public DateRecord()
public boolean calcDate(Date date, boolean strict)
date
- The Date object being filled. Its value should be set to an
acceptable default before pass in to this methodstrict
- true to be strict when parsingpublic void setAmbiguousYear(boolean ambiguousYear)
ambiguousYear
- true if it is ambiguous year.public void setAmpm(int ampm)
ampm
- ampm value.public void setDayOfMonth(int day)
day
- dayOfMonth valuepublic void setDayOfWeek(int dayOfWeek)
dayOfWeek
- day of the week.public void setEra(int era)
era
- era value being set.public void setHours(int hours)
public void setMidnightIs24(boolean midnightIs24)
midnightIs24
- whether an hour value of 24 signifies midnight.public void setMilliseconds(int milliseconds)
milliseconds
- milliseconds value.public void setMinutes(int minutes)
setMinutes
in class Date
minutes
- minute value.public void setMonth(int month)
public void setSeconds(int seconds)
setSeconds
in class Date
seconds
- second value.public void setTzOffset(int tzOffset)
tzOffset
- timezone offset.Copyright © 2018. All rights reserved.