1.4.5 • Published 6 months ago

@types/human-date v1.4.5

Weekly downloads
133
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/human-date

Summary

This package contains type definitions for human-date (https://github.com/montanaflynn/human-date).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/human-date.

index.d.ts

// Type definitions for human-date 1.4
// Project: https://github.com/montanaflynn/human-date
// Definitions by: Rico Sandyca Novenza <https://github.com/ricosandyca>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

export interface PrettyPrintOptions {
    showTime?: boolean;
}

export interface RelativeTimeOptions {
    futureSuffix?: string;
    pastSuffix?: string;
    presentText?: string;
    returnObject?: boolean;
    allUnits?: boolean;
}

export interface RelativeTimeReturns {
    seconds: number;
    hours: number;
    days: number;
    years: number;
    past: boolean;
}

// prettyPrint
export function prettyPrint(
    arg?: string | Date | number,
    options?: PrettyPrintOptions
): string;

// relativeTime
export function relativeTime(
    arg: string | Date | number,
    options?: RelativeTimeOptions & { returnObject?: false }
): string;

export function relativeTime(
    arg: string | Date | number,
    options: RelativeTimeOptions & { returnObject: true }
): RelativeTimeReturns;

// monthName
export function monthName(arg: string | Date | number): string;

// toUTC
export function toUTC(arg?: string | Date | number): Date;

Additional Details

  • Last updated: Mon, 12 Jul 2021 01:31:14 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by Rico Sandyca Novenza.

1.4.5

6 months ago

1.4.4

7 months ago

1.4.3

8 months ago

1.4.2

3 years ago

1.4.1

3 years ago

1.4.0

4 years ago