Skip to content

@technobuddha > library > Time > Year

Function: isSameYear() ​

ts
function isSameYear(
   input1: Date, 
   input2: Date, 
   options: SameYearOptions): boolean;

Defined in: is-same-year.ts:21

Determine if two dates occur in the same year

Parameters ​

ParameterTypeDescription
input1DateThe first date
input2DateThe second date
optionsSameYearOptionssee SameYearOptions

Returns ​

boolean

true, if the two dates occur in the same year

Default Value ​

ts
utc false