Package src.model

Class DateTime

Object
DateTime
All Implemented Interfaces:
Serializable

public class DateTime extends Object implements Serializable
The Class that handles the data of Date and Time
Version:
1.0
Author:
Jonathan Ng
See Also:
  • Constructor Details

    • DateTime

      public DateTime(int minute, int hour, int day, int date, int month, int year)
      Constructor for DateTime class
      Parameters:
      minute - is the minute of the Time
      hour - is the hour of the Time
      day - is the day of the Date (1. Sunday 2. Monday 3. Tuesday 4. Wednesday 5. Thursday 6. Friday 7. Saturday)
      date - is the date of the Date
      month - is the month of the Date
      year - is the year of the Date
    • DateTime

      public DateTime()
      Constructor for DateTime class
  • Method Details

    • getMinute

      public int getMinute()
      Gets the minute of the Time
      Returns:
      Minute of the Time
    • getHour

      public int getHour()
      Gets the hour of the Time
      Returns:
      Hour of the Time
    • getDate

      public int getDate()
      Gets the date of the Date
      Returns:
      Date of the Date
    • getDay

      public int getDay()
      Gets the Day of the Date
      Returns:
      Day of the Date
    • getMonth

      public int getMonth()
      Gets the Month of the Date
      Returns:
      Month of the Date
    • getYear

      public int getYear()
      Gets the Year of the Date
      Returns:
      Year of the Date
    • printTime

      public void printTime()
      Method to print out the date and the time
    • getTimeNow

      public String getTimeNow()
      Formats a string of the current time
      Returns:
      String of the current time
    • getHolidayTimeNow

      public String getHolidayTimeNow()
      Formats a string of the holiday date time
      Returns:
      String of the current holiday date time
    • getCurrentYear

      public static int getCurrentYear()
      Gets the current year
      Returns:
      Year of the current year
    • getCurrentMonth

      public static int getCurrentMonth()
      Gets the current month
      Returns:
      Month of the current month
    • getCurrentDay

      public static int getCurrentDay()
      Gets the current day
      Returns:
      Day of the current Day
    • getCurrentDate

      public static int getCurrentDate()
      Gets the current date
      Returns:
      Date of the current date