public final class DateTimeFunctions
extends net.sf.jasperreports.functions.AbstractFunctionSupport
| Constructor and Description |
|---|
DateTimeFunctions() |
| Modifier and Type | Method and Description |
|---|---|
Date |
DATE(Integer year,
Integer month,
Integer dayOfMonth)
Creates a date object using the specified information on day, month and year.
|
String |
DATEFORMAT(Date dateObj,
String formatPattern)
Format the specified date object using the chosen format pattern.
|
net.sf.jasperreports.types.date.DateRange |
DATERANGE(Object dateExprObj)
Allows to create a JasperReports DateRange instance starting from either a String expression or a Date instance.
|
Long |
DATEVALUE(Object dateObject)
Gives the corresponding numeric value (long milliseconds) for a specified date object.
|
Integer |
DAY(Object dateObject)
Returns the day of a given date.
|
Integer |
DAYS(Object startDate,
Object endDate)
Returns the number of days between two dates.
|
Integer |
DAYSINMONTH(Object dateObj)
Returns the number of days in a month.
|
Integer |
DAYSINYEAR(Object dateObj)
Returns the number of days in a year.
|
Date |
EDATE(Object dateObject,
Integer months)
Returns a date a number of months away.
|
Integer |
HOUR(Object dateObject)
Returns the hour (0-23) of the day for a given date.
|
Boolean |
ISLEAPYEAR(Object dateObj)
Checks if the given date occurs in a leap year.
|
Integer |
MINUTE(Object dateObject)
Returns the minute (0-59) of the hour for a given date.
|
Integer |
MONTH(Object dateObject)
Returns the month of a given date.
|
Integer |
MONTHS(Object startDate,
Object endDate)
Returns the number of months between two dates.
|
Integer |
NETWORKDAYS(Object startDate,
Object endDate)
Returns the number of working days between two dates (inclusive).
|
Date |
NOW()
Returns the current instant as date object.
|
Integer |
SECOND(Object dateObject)
Returns the second (0-59) of the minute for a given date.
|
static String |
TIME(Integer hours,
Integer minutes,
Integer seconds)
Returns a text string representing a time value (hours, seconds and minutes).
|
static String |
TIME(Integer hours,
Integer minutes,
Integer seconds,
String timePattern) |
Date |
TODAY()
Returns the current date as date object.
|
Integer |
WEEKDAY(Object dateObject)
Returns the day of the week for a given date.
|
Integer |
WEEKDAY(Object dateObject,
Boolean isSundayFirstDay) |
Integer |
WEEKNUM(Object dateObj)
Returns the week number of a given date.
|
Integer |
WEEKS(Object startDate,
Object endDate)
Returns the number of weeks between two dates.
|
Integer |
WEEKSINYEAR(Object dateObj)
Returns the number of weeks in a year.
|
Date |
WORKDAY(Object dateObject,
Integer workdays)
Returns a date a number of workdays away.
|
Integer |
YEAR(Object dateObject)
Returns the year of a given date.
|
Integer |
YEARS(Object startDate,
Object endDate)
Returns the number of years between two dates.
|
public Date TODAY()
public Date NOW()
public Integer YEAR(Object dateObject)
public Integer MONTH(Object dateObject)
public Integer DAY(Object dateObject)
public Integer WEEKDAY(Object dateObject)
public Integer HOUR(Object dateObject)
public Integer MINUTE(Object dateObject)
public Integer SECOND(Object dateObject)
public Date DATE(Integer year, Integer month, Integer dayOfMonth)
public Long DATEVALUE(Object dateObject)
public static String TIME(Integer hours, Integer minutes, Integer seconds)
public Date WORKDAY(Object dateObject, Integer workdays)
public Integer NETWORKDAYS(Object startDate, Object endDate)
public Integer DAYS(Object startDate, Object endDate)
public Integer WEEKS(Object startDate, Object endDate)
public Integer MONTHS(Object startDate, Object endDate)
public Integer YEARS(Object startDate, Object endDate)
public Boolean ISLEAPYEAR(Object dateObj)
public String DATEFORMAT(Date dateObj, String formatPattern)
public net.sf.jasperreports.types.date.DateRange DATERANGE(Object dateExprObj)
Copyright © 2019 TIBCO Software Inc.. All rights reserved.