public class ExtendedServerContext
extends ServerContext
This is for compatibility mode only adds the missing functionality that 3.x supports.
nanoSeconds Current system time in nanoseconds
dateTime Current system time via a DateTime utility object (see below)
dateTime
milliSeconds, seconds, minutes, hours Integer values for milliSeconds, seconds and minutes.
dayOfWeek, dayOfMonth, dayOfYear Integer value for day of week, month and year.
weekOfMonth, weekOfYear Integer value for week of month and year
month Integer value for month of year
zone String. The TimeZone display name.
withTimeZone('timeZoneString') Changes TimeZone to that specified using TimeZone string identifier. Returns
DateTime for method chaining. (Does not alter system timeZone or affect other uses of server.dateTime)
withLocale('localeString') Changes DateTime Locale to that specified using Locale string identifier. Returns
DateTime for method chaining. Returns DateTime for method chaining. (Does not alter system locale or affect other uses of
server.dateTime)
isBefore(DateTimeContext date) Boolean. Returns true if the date parameter is before the current DateTime.
isAfter(DateTimeContext date) Boolean. Returns true if the date parameter is after the current DateTime.
addSeconds(int seconds) Add n seconds to the current DateTime. Returns DateTime for method chaining.
addMinutes(int minutes) Add n minutes to the current DateTime. Returns DateTime for method chaining.
addHours(int hours) Add n hours to the current DateTime. Returns DateTime for method chaining.
addDay(int days) Add n days to the current DateTime. Returns DateTime for method chaining.
addWeeks(int weeks) Add n weeks to the current DateTime. Returns DateTime for method chaining.
addMonths(int months) Add n months to the current DateTime. Returns DateTime for method chaining.
addYears(int years) Add n years to the current DateTime. Returns DateTime for method chaining.