Day
Syntax
Day(): numberReturn Value
Description
Example
// Get current day of month
const day = this.api.Day()
console.log(`Current day: ${day}`)
// Check if it's the first day of month
if (this.api.Day() === 1) {
console.log('First day of the month')
}
// Check if it's end of month
if (this.api.Day() >= 28) {
// Additional logic needed for accurate end-of-month check
console.log('Approaching end of month')
}
// Format date with leading zero if needed
const formattedDay = this.api.Day().toString().padStart(2, '0')
console.log(`Formatted day: ${formattedDay}`)Last updated