• Seconds per bar for a fixed-length interval code, e.g. D -> 86400, 1m -> 60, 1h -> 3600.

    Throws UnknownIntervalError for a code nothing recognises, and a plain error for a calendar or count-driven code, which has no seconds to give. It used to answer 60 for both, which drew minute bars under whatever label the caller thought it had asked for.

    Prefer resolveInterval() and bucketStartOf(): they cover every registered code, not just the ones that happen to have a fixed length.

    Parameters

    • interval: string

    Returns number