0.13.2 • Published 6 months ago

@types/xmpp__time v0.13.2

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

Installation

npm install --save @types/xmpp__time

Summary

This package contains type definitions for @xmpp/time (https://github.com/xmppjs/xmpp.js/tree/main/packages/time).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/xmpp__time.

index.d.ts

// Type definitions for @xmpp/time 0.13
// Project: https://github.com/xmppjs/xmpp.js/tree/main/packages/time
// Definitions by: BendingBender <https://github.com/BendingBender>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

/**
 * @example
 * import { date } from '@xmpp/time';
 *
 * date(); // '2016-11-18'
 * date("05 October 2011 14:48 UTC"); // '2011-10-05'
 * date(new Date("05 October 2011 14:48 UTC")); // '2011-10-05'
 */
export function date(date?: string | Date): string;
/**
 * @example
 * import { time } from '@xmpp/time';
 *
 * time(); // '20:45:30Z'
 * time("05 October 2011 14:48 UTC"); // '14:48:00Z'
 * time(new Date("05 October 2011 14:48 UTC")); // '14:48:00Z'
 */
export function time(date?: string | Date): string;
/**
 * @example
 * import { datetime } from '@xmpp/time';
 *
 * datetime(); // '2016-11-18T20:45:53Z'
 * datetime("05 October 2011 14:48 UTC"); // '2011-10-05T14:48:00Z'
 * datetime(new Date("05 October 2011 14:48 UTC")); // '2011-10-05T14:48:00Z'
 */
export function datetime(date?: string | Date): string;
/**
 * @example
 * import { offset } from '@xmpp/time';
 *
 * offset(); // '-1:00'
 * offset("05 October 2011 14:48 UTC"); // '-1:00'
 * offset(new Date("05 October 2011 14:48 UTC")); // '-1:00'
 */
export function offset(date?: string | Date): string;

Additional Details

  • Last updated: Tue, 30 Nov 2021 17:31:53 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by BendingBender.