Class plainDate

java.lang.Object
  extended by plainDate

public class plainDate
extends java.lang.Object

plainDate is a way to read the date information from an assignment.

Version:
1.3
Author:
Fred Kral

Constructor Summary
plainDate()
           
plainDate(int day, int month, int year)
          plainDate collects all the calendar data with functions that suit our input file
plainDate(int day, java.lang.String monthString, int year)
          plainDate with a non-numerical month
plainDate(java.lang.String dayMonthLine, int year)
          plainDate(line, year) uses a string in this format: 09 Dec, Tue
 
Method Summary
 plainDate addDays(int numDays)
          Return a day in the future (or past) counting by days
static int convertDate(java.lang.String month)
           
static long daysBetween(java.util.Calendar startDate, java.util.Calendar endDate)
           
 int differenceInDaysInclusive(plainDate pDate)
           
 boolean equals(plainDate pDate)
           
 java.util.Calendar getCalendar()
           
 int getDay()
           
 int getDayOfWeekFromMonday()
           
 int getMonth()
           
 plainDate getToday(boolean sysPrint)
           
 boolean getValidDate()
           
 java.lang.String getWeekdayName()
           
 int getYear()
           
static int parseDay(java.lang.String line)
           
static java.lang.String parseMonth(java.lang.String line)
           
 java.lang.String sysPrint(boolean printIt)
          sysPrint
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

plainDate

public plainDate()

plainDate

public plainDate(java.lang.String dayMonthLine,
                 int year)
plainDate(line, year) uses a string in this format: 09 Dec, Tue


plainDate

public plainDate(int day,
                 java.lang.String monthString,
                 int year)
plainDate with a non-numerical month

Parameters:
monthString - is of the format: Dec

plainDate

public plainDate(int day,
                 int month,
                 int year)
plainDate collects all the calendar data with functions that suit our input file

Parameters:
day - 1-31
month - 1-12
year - for example 2015
Method Detail

getValidDate

public boolean getValidDate()

getDay

public int getDay()

getMonth

public int getMonth()

getYear

public int getYear()

getCalendar

public java.util.Calendar getCalendar()

equals

public boolean equals(plainDate pDate)

getDayOfWeekFromMonday

public int getDayOfWeekFromMonday()

getWeekdayName

public java.lang.String getWeekdayName()

differenceInDaysInclusive

public int differenceInDaysInclusive(plainDate pDate)

daysBetween

public static long daysBetween(java.util.Calendar startDate,
                               java.util.Calendar endDate)

addDays

public plainDate addDays(int numDays)
Return a day in the future (or past) counting by days


sysPrint

public java.lang.String sysPrint(boolean printIt)
sysPrint

Parameters:
printIt - - Does it produce printout?
Returns:
Returns a printable String, but is it really?

parseDay

public static int parseDay(java.lang.String line)

parseMonth

public static java.lang.String parseMonth(java.lang.String line)

convertDate

public static int convertDate(java.lang.String month)

getToday

public plainDate getToday(boolean sysPrint)