Share:
Developers » Script Objects & Methods » ScriptDate

PREVIOUS  |  NEXT

ScriptDate


The following table lists the available methods for the ScriptDate object:

Return TypeMethodExplanation
String format(String format) Returns the date in the specified format. Use any common String pattern for java.text.SimpleDateFormat, such as yyyy-MM-dd, or MMddyyyy HH:mm:ss 
Date getDate()
Returns the java.util.Date object
String getUserFormat()Returns the date in the user's preferred date format
Int 
getMinute()Returns the minutes, using 0-59
Int 
getHour()Returns the hour, using 0-23
Int  getMonth()Returns the month, using 0-11 where 0 = January
Int getYear()Returns the year, using four digits
Int getDayOfWeek()Returns the day of the week, using 1-7 where 1 = Sunday
Int getDayOfMonth() Returns the day of the month, using 1-31 
Int getDayOfYear() Returns the day of the year, using 1-365 
Int getDifferenceInDays(Object date) Returns the difference in days between two dates 
Int getDifferenceInHours(Object date)  Returns the difference in hours between two dates 
Int getDifferenceInMinutes(Object date) Returns the difference in minutes between two dates 
ScriptDate addDays(int days) Returns a new date by adding the specified number of days 
ScriptDate addWorkDays(int days) Returns a new date by adding the specified number of working days 
Boolean after(Object date)Parameter date can be java.util.Date or String in these formats: 111508 or 2008-11-15, or ScriptDate
Boolean  before(Object date)Parameter date can be java.util.Date or String in these formats: 111508 or 2008-11-15, or ScriptDate