Skip to content

isSameOrBetweenYears Type documentation

TypeScript declaration

import { isSameOrBetweenYears } from '@siemens/element-ng/datepicker';

Compare the current year is the same year or between start and end year.

Returns: true if the date is in the provided range.

isSameOrBetweenYears(current: Date, from?: Date, to?: Date): boolean

Compare the current year is the same year or between start and end year.

Returns: true if the date is in the provided range.

Parameters
  • • the year object.

    current : Date

  • • optional min year, if no value is provided we assume true for the min value.

    from ? : Date

  • • optional max year, if no value is provided we assume true for the max value.

    to ? : Date


Except where otherwise noted, content on this site is licensed under MIT License.