|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectshared.formatting.DateFormatter.Epoch
protected class DateFormatter.Epoch
Convert between two- and four-digit years using a single year as the start of a two-digit epoch.
Field Summary | |
---|---|
private int |
epochBoundary
The smallest two-digit year which occurs within the first of two centuries. |
private int |
firstCentury
The first of two centuries for date conversions. |
private int |
secondCentury
The second of two centuries for date conversions. |
Constructor Summary | |
---|---|
DateFormatter.Epoch()
Default constructor. |
|
DateFormatter.Epoch(int firstYearInEpoch)
Create an epoch instance which begins in the year given. |
Method Summary | |
---|---|
protected int |
defaultEpoch()
Construct a default epoch |
protected void |
init(int firstYearInEpoch)
Initialize an epoch instance which begins in a particular year |
int |
placeInEpoch(int twoDigitYear)
Place a two-digit year within this epoch. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private int epochBoundary
private int firstCentury
private int secondCentury
Constructor Detail |
---|
public DateFormatter.Epoch()
The epoch assumed is one which starts 49 years before now. The input date separator is assumed to be "/".
public DateFormatter.Epoch(int firstYearInEpoch)
The input date separator is assumed to be a "/".
firstYearInEpoch
- The first year of the century in
which two-digit years begin.Method Detail |
---|
public int placeInEpoch(int twoDigitYear)
twoDigitYear
- two-digit year within the given epoch
protected int defaultEpoch()
protected void init(int firstYearInEpoch)
firstYearInEpoch
- the first year in the two-digit epoch
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |