Gets the current date and time for the current calendar or the passed in calendar.
Returns
The current date and time. The month and day are index's and as such start at 0 instead of 1. If the passed in calendar can't be found null will be returned.
Example
// Assuming a Gregorian calendar SimpleCalendar.api.currentDateTime(); //Returns a DateTime object like this // { // year: 2021, // month: 11, // day: 24, // hour: 12, // minute: 13, // seconds: 14 // }
Parameters
calendarId: string = 'active'
Optional parameter to specify the ID of the calendar to get the current day from. If not provided the current active calendar will be used.
Gets the current date and time for the current calendar or the passed in calendar.
Returns
The current date and time. The month and day are index's and as such start at 0 instead of 1. If the passed in calendar can't be found null will be returned.
Example