isSameYear()
Determines if one date is in the same year as another date.
This function is valid in
v2.20.0 to v2.24.3.
This function has been downloaded 40 times.
Parameters
{Date}
date1
The date to be compared to date2
.
{Date=}
date2
Optional, Default:undefined
The date to be compared to date1
. If undefined
or not specified then a partial function will be returned which will accept date2
as its only parameter.
Returns
{boolean|Function}
If date2
is not given or is undefined
a partial function will be returned which will accept date2
as its only parameter. If date1
and date2
are specified then a boolean indicating whether or not they are in the same year will be returned.
Required Functions
This function directly requires the following functions which are included automatically:
-
endOfDay()
Determines the latest date-time of the year, month, and day of a specific Date
object.
-
endOfFridayWeek()
Determines the latest date-time of the year, month, and week (Friday to Thursday) of a specific Date
object.
-
endOfHour()
Determines the latest date-time of the year, month, day, and hour of a specific Date
object.
-
endOfMinute()
Determines the latest date-time of the year, month, day, hour, and minute of a specific Date
object.
-
endOfMondayWeek()
Determines the latest date-time of the year, month, and week (Monday to Sunday) of a specific Date
object.
-
endOfMonth()
Determines the latest date-time of the year and month of a specific Date
object.
-
endOfSaturdayWeek()
Determines the latest date-time of the year, month, and week (Saturday to Friday) of a specific Date
object.
-
endOfSecond()
Determines the latest date-time of the year, month, day, hour, minute, and second of a specific Date
object.
-
endOfSundayWeek()
Determines the latest date-time of the year, month, and week (Sunday to Saturday) of a specific Date
object.
-
endOfThursdayWeek()
Determines the latest date-time of the year, month, and week (Thursday to Wednesday) of a specific Date
object.
-
endOfTuesdayWeek()
Determines the latest date-time of the year, month, and week (Tuesday to Monday) of a specific Date
object.
-
endOfWednesdayWeek()
Determines the latest date-time of the year, month, and week (Wednesday to Tuesday) of a specific Date
object.
-
endOfWeek()
Determines the latest date-time of the year, month, and week (Sunday to Saturday) of a specific Date
object.
-
endOfYear()
Determines the latest date-time of the year of a specific Date
object.
-
isSameDay()
Determines if one date is in the same year, month and day as another date.
-
isSameFridayWeek()
Determines if one date is in the same year, month, and week (Friday to Thursday) as another date.
-
isSameHour()
Determines if one date is in the same year, month, day, and hour as another date.
-
isSameMinute()
Determines if one date is in the same year, month, day, hour, and minute as another date.
-
isSameMondayWeek()
Determines if one date is in the same year, month, and week (Monday to Sunday) as another date.
-
isSameMonth()
Determines if one date is in the same year and month as another date.
-
isSameSaturdayWeek()
Determines if one date is in the same year, month, and week (Saturday to Friday) as another date.
-
isSameSecond()
Determines if one date is in the same year, month, day, hour, minute, and second as another date.
-
isSameSundayWeek()
Determines if one date is in the same year, month, and week (Sunday to Saturday) as another date.
-
isSameThursdayWeek()
Determines if one date is in the same year, month, and week (Thursday to Wednesday) as another date.
-
isSameTuesdayWeek()
Determines if one date is in the same year, month, and week (Tuesday to Monday) as another date.
-
isSameWednesdayWeek()
Determines if one date is in the same year, month, and week (Wednesday to Tuesday) as another date.
-
isSameWeek()
Determines if one date is in the same year, month, and week (Sunday to Saturday) as another date.
-
spanOfDay()
Determines the earliest and latest date-times of the year, month, and day of a specific Date
object.
-
spanOfFridayWeek()
Determines the earliest and latest date-times of the year, month, and week (Friday to Thursday) of a specific Date
object.
-
spanOfHour()
Determines the earliest and latest date-times of the year, month, day, and hour of a specific Date
object.
-
spanOfMinute()
Determines the earliest and latest date-times of the year, month, day, hour, and minute of a specific Date
object.
-
spanOfMondayWeek()
Determines the earliest and latest date-times of the year, month, and week (Monday to Sunday) of a specific Date
object.
-
spanOfMonth()
Determines the earliest and latest date-times of the year and month of a specific Date
object.
-
spanOfSaturdayWeek()
Determines the earliest and latest date-times of the year, month, and week (Saturday to Friday) of a specific Date
object.
-
spanOfSecond()
Determines the earliest and latest date-times of the year, month, day, hour, minute, and second of a specific Date
object.
-
spanOfSundayWeek()
Determines the earliest and latest date-times of the year, month, and week (Sunday to Saturday) of a specific Date
object.
-
spanOfThursdayWeek()
Determines the earliest and latest date-times of the year, month, and week (Thursday to Wednesday) of a specific Date
object.
-
spanOfTuesdayWeek()
Determines the earliest and latest date-times of the year, month, and week (Tuesday to Monday) of a specific Date
object.
-
spanOfWednesdayWeek()
Determines the earliest and latest date-times of the year, month, and week (Wednesday to Tuesday) of a specific Date
object.
-
spanOfWeek()
Determines the earliest and latest date-times of the year, month, and week (Sunday to Saturday) of a specific Date
object.
-
spanOfYear()
Determines the earliest and latest date-times of the year of a specific Date
object.
-
startOfDay()
Determines the earliest date-time of the year, month, and day of a specific Date
object.
-
startOfFridayWeek()
Determines the earliest date-time of the year, month, and week (Friday to Thursday) of a specific Date
object.
-
startOfHour()
Determines the earliest date-time of the year, month, day, and hour of a specific Date
object.
-
startOfMinute()
Determines the earliest date-time of the year, month, day, hour, and minute of a specific Date
object.
-
startOfMondayWeek()
Determines the earliest date-time of the year, month, and week (Monday to Sunday) of a specific Date
object.
-
startOfMonth()
Determines the earliest date-time of the year and month of a specific Date
object.
-
startOfSaturdayWeek()
Determines the earliest date-time of the year, month, and week (Saturday to Friday) of a specific Date
object.
-
startOfSecond()
Determines the earliest date-time of the year, month, day, hour, minute, and second of a specific Date
object.
-
startOfSundayWeek()
Determines the earliest date-time of the year, month, and week (Sunday to Saturday) of a specific Date
object.
-
startOfThursdayWeek()
Determines the earliest date-time of the year, month, and week (Thursday to Wednesday) of a specific Date
object.
-
startOfTuesdayWeek()
Determines the earliest date-time of the year, month, and week (Tuesday to Monday) of a specific Date
object.
-
startOfWednesdayWeek()
Determines the earliest date-time of the year, month, and week (Wednesday to Tuesday) of a specific Date
object.
-
startOfWeek()
Determines the earliest date-time of the year, month, and week (Sunday to Saturday) of a specific Date
object.
-
startOfYear()
Determines the earliest date-time of the year of a specific Date
object.
Requiring Functions
This function is directly required by the following functions:
-
endOfDay()
Determines the latest date-time of the year, month, and day of a specific Date
object.
-
endOfFridayWeek()
Determines the latest date-time of the year, month, and week (Friday to Thursday) of a specific Date
object.
-
endOfHour()
Determines the latest date-time of the year, month, day, and hour of a specific Date
object.
-
endOfMinute()
Determines the latest date-time of the year, month, day, hour, and minute of a specific Date
object.
-
endOfMondayWeek()
Determines the latest date-time of the year, month, and week (Monday to Sunday) of a specific Date
object.
-
endOfMonth()
Determines the latest date-time of the year and month of a specific Date
object.
-
endOfSaturdayWeek()
Determines the latest date-time of the year, month, and week (Saturday to Friday) of a specific Date
object.
-
endOfSecond()
Determines the latest date-time of the year, month, day, hour, minute, and second of a specific Date
object.
-
endOfSundayWeek()
Determines the latest date-time of the year, month, and week (Sunday to Saturday) of a specific Date
object.
-
endOfThursdayWeek()
Determines the latest date-time of the year, month, and week (Thursday to Wednesday) of a specific Date
object.
-
endOfTuesdayWeek()
Determines the latest date-time of the year, month, and week (Tuesday to Monday) of a specific Date
object.
-
endOfWednesdayWeek()
Determines the latest date-time of the year, month, and week (Wednesday to Tuesday) of a specific Date
object.
-
endOfWeek()
Determines the latest date-time of the year, month, and week (Sunday to Saturday) of a specific Date
object.
-
endOfYear()
Determines the latest date-time of the year of a specific Date
object.
-
isSameDay()
Determines if one date is in the same year, month and day as another date.
-
isSameFridayWeek()
Determines if one date is in the same year, month, and week (Friday to Thursday) as another date.
-
isSameHour()
Determines if one date is in the same year, month, day, and hour as another date.
-
isSameMinute()
Determines if one date is in the same year, month, day, hour, and minute as another date.
-
isSameMondayWeek()
Determines if one date is in the same year, month, and week (Monday to Sunday) as another date.
-
isSameMonth()
Determines if one date is in the same year and month as another date.
-
isSameSaturdayWeek()
Determines if one date is in the same year, month, and week (Saturday to Friday) as another date.
-
isSameSecond()
Determines if one date is in the same year, month, day, hour, minute, and second as another date.
-
isSameSundayWeek()
Determines if one date is in the same year, month, and week (Sunday to Saturday) as another date.
-
isSameThursdayWeek()
Determines if one date is in the same year, month, and week (Thursday to Wednesday) as another date.
-
isSameTuesdayWeek()
Determines if one date is in the same year, month, and week (Tuesday to Monday) as another date.
-
isSameWednesdayWeek()
Determines if one date is in the same year, month, and week (Wednesday to Tuesday) as another date.
-
isSameWeek()
Determines if one date is in the same year, month, and week (Sunday to Saturday) as another date.
-
spanOfDay()
Determines the earliest and latest date-times of the year, month, and day of a specific Date
object.
-
spanOfFridayWeek()
Determines the earliest and latest date-times of the year, month, and week (Friday to Thursday) of a specific Date
object.
-
spanOfHour()
Determines the earliest and latest date-times of the year, month, day, and hour of a specific Date
object.
-
spanOfMinute()
Determines the earliest and latest date-times of the year, month, day, hour, and minute of a specific Date
object.
-
spanOfMondayWeek()
Determines the earliest and latest date-times of the year, month, and week (Monday to Sunday) of a specific Date
object.
-
spanOfMonth()
Determines the earliest and latest date-times of the year and month of a specific Date
object.
-
spanOfSaturdayWeek()
Determines the earliest and latest date-times of the year, month, and week (Saturday to Friday) of a specific Date
object.
-
spanOfSecond()
Determines the earliest and latest date-times of the year, month, day, hour, minute, and second of a specific Date
object.
-
spanOfSundayWeek()
Determines the earliest and latest date-times of the year, month, and week (Sunday to Saturday) of a specific Date
object.
-
spanOfThursdayWeek()
Determines the earliest and latest date-times of the year, month, and week (Thursday to Wednesday) of a specific Date
object.
-
spanOfTuesdayWeek()
Determines the earliest and latest date-times of the year, month, and week (Tuesday to Monday) of a specific Date
object.
-
spanOfWednesdayWeek()
Determines the earliest and latest date-times of the year, month, and week (Wednesday to Tuesday) of a specific Date
object.
-
spanOfWeek()
Determines the earliest and latest date-times of the year, month, and week (Sunday to Saturday) of a specific Date
object.
-
spanOfYear()
Determines the earliest and latest date-times of the year of a specific Date
object.
-
startOfDay()
Determines the earliest date-time of the year, month, and day of a specific Date
object.
-
startOfFridayWeek()
Determines the earliest date-time of the year, month, and week (Friday to Thursday) of a specific Date
object.
-
startOfHour()
Determines the earliest date-time of the year, month, day, and hour of a specific Date
object.
-
startOfMinute()
Determines the earliest date-time of the year, month, day, hour, and minute of a specific Date
object.
-
startOfMondayWeek()
Determines the earliest date-time of the year, month, and week (Monday to Sunday) of a specific Date
object.
-
startOfMonth()
Determines the earliest date-time of the year and month of a specific Date
object.
-
startOfSaturdayWeek()
Determines the earliest date-time of the year, month, and week (Saturday to Friday) of a specific Date
object.
-
startOfSecond()
Determines the earliest date-time of the year, month, day, hour, minute, and second of a specific Date
object.
-
startOfSundayWeek()
Determines the earliest date-time of the year, month, and week (Sunday to Saturday) of a specific Date
object.
-
startOfThursdayWeek()
Determines the earliest date-time of the year, month, and week (Thursday to Wednesday) of a specific Date
object.
-
startOfTuesdayWeek()
Determines the earliest date-time of the year, month, and week (Tuesday to Monday) of a specific Date
object.
-
startOfWednesdayWeek()
Determines the earliest date-time of the year, month, and week (Wednesday to Tuesday) of a specific Date
object.
-
startOfWeek()
Determines the earliest date-time of the year, month, and week (Sunday to Saturday) of a specific Date
object.
-
startOfYear()
Determines the earliest date-time of the year of a specific Date
object.