|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.abstracthorizon.mercury.common.util.RFCDate
public class RFCDate
Class that represents RFC's date
Field Summary | |
---|---|
static SimpleDateFormat |
DATE_FORMAT
Date format |
protected String |
dateString
Date string |
protected int |
day
Day |
protected int |
hour
Hour |
protected int |
l
|
protected int |
minute
Minute\ |
protected int |
month
Month |
protected int |
p
|
protected int |
second
Second |
protected int |
timezone
Timezone |
protected String |
timezoneId
Timezone Id |
protected boolean |
valid
Is valid date or not |
protected int |
year
Year |
Constructor Summary | |
---|---|
RFCDate(String s)
Constructor |
Method Summary | |
---|---|
protected boolean |
character(char ch)
Checks next character is given character |
protected int |
digit()
Returns digit (oc next character) or -1 |
Calendar |
getCalendar()
Returns calendar |
Date |
getDate()
Returns date |
boolean |
isValid()
Returns is date valid |
static void |
main(String[] args)
|
protected boolean |
parse()
Parses date |
protected boolean |
parseDay()
Parses day |
protected boolean |
parseDayOfWeek()
Parses day of week |
protected boolean |
parseHour()
Parses hour |
protected boolean |
parseMinute()
Parses minute |
protected boolean |
parseMonth()
Parses month |
protected boolean |
parseSecond()
Parses second |
protected boolean |
parseTimeZone()
Parses timezone |
protected boolean |
parseYear()
Parses year |
static void |
test(String d)
|
protected boolean |
trim()
Trims date string |
static boolean |
validate(String s)
Validates given date string |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final SimpleDateFormat DATE_FORMAT
protected transient String dateString
protected int day
protected int month
protected int year
protected int hour
protected int minute
protected int second
protected int timezone
protected String timezoneId
protected boolean valid
protected transient int p
protected transient int l
Constructor Detail |
---|
public RFCDate(String s)
s
- dateMethod Detail |
---|
public boolean isValid()
protected boolean trim()
protected boolean parseDayOfWeek()
true
if validprotected boolean character(char ch)
ch
- character to be checked with
true
if next character is given characterprotected int digit()
protected boolean parseDay()
true
if validprotected boolean parseMonth()
true
if validprotected boolean parseYear()
true
if validprotected boolean parseHour()
true
if validprotected boolean parseMinute()
true
if validprotected boolean parseSecond()
true
if validprotected boolean parseTimeZone()
true
if validprotected boolean parse()
true
if validpublic Date getDate()
public Calendar getCalendar()
public static boolean validate(String s)
s
- date string
true
if validpublic static void main(String[] args) throws Exception
Exception
public static void test(String d)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |