@hebcal/hdate
    Preparing search index...

    Type Alias FlexibleTimeUnit

    FlexibleTimeUnit: ToFlexibleUnit<TimeUnit>

    Units that can be passed to HDate.add and HDate.subtract.

    The four units are day, week, month and year. Each may be written singular or plural, in any capitalization ('day', 'Days', 'YEARS'). The one-letter shorthands d, w, M and y are also accepted, and those are case sensitive: M is months, to leave m free for minutes in packages built on top of this one.

    import {HDate, FlexibleTimeUnit, months} from '@hebcal/hdate';
    const unit: FlexibleTimeUnit = 'weeks';
    const hd = new HDate(15, months.CHESHVAN, 5769);
    hd.add(1, unit).toString(); // '22 Cheshvan 5769'
    hd.add(1, 'w').toString(); // '22 Cheshvan 5769'
    hd.add(1, 'M').toString(); // '15 Kislev 5769'