SheetXL - v0.8.0-beta.9+sites.210.e2d420901
    Preparing search index...

    Fills date series. Values are spreadsheet SERIAL numbers, never JavaScript Date objects — a cell stores a date as a number, so filling one is arithmetic on that number and nothing has to be boxed and unboxed to run it.

    Which numbers are dates comes from IAutoFill.Options.types, because a serial is indistinguishable from any other number without the cell's format.

    Implements

    Index
    id: string

    Identifies the filler. Must be unique among the fillers in use.

    This is what names the fill in a menu, survives into a transaction's ITransaction.Operation.params, and lets a script ask for a fill type by name — so it is a stable key, not a display label.

    supportsStep: boolean = true

    Whether Options.stepValue means anything to this filler.

    These three say only which fields an authoring surface should OFFER; they say nothing about whether the filler can be applied to a given selection (see Preset). The step's meaning is the filler's own — an addend for a linear series, a RATIO for a growth one, a count of units for a date one — so the value is passed through uninterpreted.

    supportsStop: boolean = true

    Whether Options.stopValue means anything to this filler.

    Only an ordered series can be stopped; a list or an ordinal one has nothing to compare.

    type: InteropScalarType = InteropScalarType.Date

    The value type this filler reads.

    • The filler is only ever offered values of this type — a claim that runs past the type is trimmed back, so matches does not have to re-check what the caller already knows. Blanks carry no type and never split a series.
    • Leave it undefined to be offered a segment of ANY type (still one type at a time).
    • Dates are InteropScalarType.Date: cell values are serial numbers, and it is the cell's number format — not the runtime type — that makes one a date.
    • A filler that reads more than one type registers once per type; where it sits in each Composite's list is its priority for that type.
    • Create a IAutoFill.FillAt function using the provided values and options.

      Parameters

      • values: readonly number[]
      • Optionaloptions: DateOptions

      Returns FillAt<number> | null

      • The first elements in the values is guaranteed to never be null.
      • Return null if the autofill is unable to fill.
    • Claims every serial in the run — a date template that turns out NOT to be a series is repeated whole (Excel does the same), so it is never split into shorter ones.

      Parameters

      • values: readonly number[]
      • from: number = 0

      Returns number