$Calendar¶
Provides the default calendar instance with domain-specific calendar rules.
1 |
|
Remarks¶
$Calendar
is used to obtain the current date and time, perform date and time arithmetic (addition and subtraction), and manage time zone conversions.
$Calendar
can be utilized in both client-side and server-side scripts. In server-side scripts, both synchronous and asynchronous methods are supported. However, client-side scripts are restricted to asynchronous methods due to their inherent asynchronous nature.
$Calendar
defaults to using the domain calendar rules. For specific calendar implementations, refer to the Calendar.StandardCalendar or Calendar.WeekendCalendar objects.
Server-side example for adding days:
Example¶
1 2 |
|
Client-side example for adding days (asynchronous):
Example¶
1 2 |
|