public class GosuDateUtil extends Object
| Constructor and Description |
|---|
GosuDateUtil() |
| Modifier and Type | Method and Description |
|---|---|
static Date |
addDays(Date date,
int iDays)
Adds the specified (signed) amount of days to the given date.
|
static Date |
addHours(Date date,
int iHours)
Adds the specified (signed) amount of hours to the given date.
|
static Date |
addMinutes(Date date,
int iMinutes)
Adds the specified (signed) amount of minutes to the given date.
|
static Date |
addMonths(Date date,
int iMonths)
Adds the specified (signed) amount of months to the given date.
|
static Date |
addSeconds(Date date,
int iSeconds)
Adds the specified (signed) amount of seconds to the given date.
|
static Date |
addWeeks(Date date,
int iWeeks)
Adds the specified (signed) amount of weeks to the given date.
|
static Date |
addYears(Date date,
int iYears)
Adds the specified (signed) amount of years to the given date.
|
static int |
getDayOfMonth(Date date)
Get the day of month.
|
static int |
getDayOfWeek(Date date)
Get the day of week.
|
static int |
getDayOfYear(Date date)
Get the day of year.
|
static int |
getHour(Date date)
Get the hour of the time, base on a 12-hour clock.
|
static int |
getHourOfDay(Date date)
Get the hour of the time, based on a 24-hour clock.
|
static int |
getMinute(Date date)
Get the minute of the time
|
static int |
getMonth(Date date)
The month of the year.
|
static int |
getSecond(Date date)
Get the second of the time
|
static int |
getWeekOfMonth(Date date)
Get the week of month.
|
static int |
getWeekOfYear(Date date)
Get the week of the year.
|
static int |
getYear(Date date)
Get the year.
|
static boolean |
isAM(Date date)
Is the time AM?
|
static boolean |
isPM(Date date)
Is the time PM?
|
public static Date addSeconds(Date date, int iSeconds)
addSeconds(Date, -5).date - The time.iSeconds - The amount of seconds to add.public static Date addMinutes(Date date, int iMinutes)
addMinutes(Date, -5).date - The time.iMinutes - The amount of minutes to add.public static Date addHours(Date date, int iHours)
addHours(Date, -5).date - The time.iHours - The amount of hours to add.public static Date addDays(Date date, int iDays)
addDays(Date, -5).date - The time.iDays - The amount of days to add.public static Date addWeeks(Date date, int iWeeks)
addWeeks(Date, -5).date - The time.iWeeks - The amount of weeks to add.public static Date addMonths(Date date, int iMonths)
addMonths(Date, -5).date - The time.iMonths - The amount of months to add.public static Date addYears(Date date, int iYears)
addYears(Date, -5).date - The time.iYears - The amount of years to add.public static int getSecond(Date date)
date - The time.public static int getMinute(Date date)
date - The time.public static int getHour(Date date)
date - The time.public static boolean isAM(Date date)
date - The time.public static boolean isPM(Date date)
date - The time.public static int getHourOfDay(Date date)
date - The time.public static int getDayOfWeek(Date date)
date - The date.public static int getDayOfMonth(Date date)
date - The date.public static int getDayOfYear(Date date)
date - The date.public static int getWeekOfMonth(Date date)
date - The date.public static int getWeekOfYear(Date date)
date - The date.public static int getMonth(Date date)
date - The datepublic static int getYear(Date date)
date - The date.Copyright © 2016. All rights reserved.