Class DateUtils
A class with several utility methods for Date objects.
Deprecated:
See each method for additional information.
This class does not have a constructor, so you cannot create it directly.
| Method | Description |
|---|---|
| Returns the current time stamp in the time zone of the instance. | |
| Returns the current timestamp in the time zone of the current site. | |
| Returns the current time stamp in UTC. |
assign, create, create, defineProperties, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toLocaleString, toString, valueOf, values
static nowForInstance(): DateReturns the current time stamp in the time zone of the instance.
Returns:
- the current time stamp in the time zone of the instance.
Deprecated:
Use System.getCalendar() instead.
static nowForSite(): DateReturns the current timestamp in the time zone of the current site.
Returns:
- the current timestamp in the time zone of the current site.
Deprecated:
Use Site.getCalendar() instead.
static nowInUTC(): DateReturns the current time stamp in UTC.
Returns:
- the current time stamp in UTC.
Deprecated:
Create a new Calendar object and set the time zone "UTC" instead.