Skip to main content
Version: 2.4.x

Interface: DateData

SimpleCalendar.DateData

Object containing all information about a date and time. This can either be the current date and time or the date and time calculated from a timestamp

Properties

currentSeason

currentSeason: SeasonData

The season information for this date


day

day: number

The index of the day in the month for this date.


dayOfTheWeek

dayOfTheWeek: number

The day of the week the day falls on.


dayOffset

dayOffset: number

The number of days that the months days are offset by.


display

display: DateDisplayData

All the formatted strings for displaying this date


hour

hour: number

The hour portion of the time


isLeapYear

isLeapYear: boolean

If this date falls on a leap year.


midday

midday: number

The timestamp of when it is considered midday for this date.


minute

minute: number

The minute portion of the time


month

month: number

The index of the month in the year for this date.


second

second: number

The second portion of the time


showWeekdayHeadings

showWeekdayHeadings: boolean

If to show the weekday headings for the month.


sunrise

sunrise: number

The timestamp of when the sun rises for this date.


sunset

sunset: number

The timestamp of when the sun sets for this date.


weekdays

weekdays: string[]

A list of weekday names.


year

year: number

The year for this date.


yearZero

yearZero: number

The year that is considered to be the starting year. This is the year used to base calculating timestamps from