Sanity Library Reference Docs
    Preparing search index...

    Interface FormattedDuration

    The result of the duration formatter

    interface FormattedDuration {
        formatted: string;
        iso8601: string;
    }
    Index

    Properties

    Properties

    formatted: string

    The human-readable, formatted duration as a string, eg "2 days, 3 hr, and 20 sec"

    iso8601: string

    The machine-readable, formatted ISO-8601 duration string, eg "P2DT3H20S"