@barchart/common-js
Version:
Library of common JavaScript utilities
48 lines (47 loc) • 949 B
TypeScript
/**
* Returns the current Unix timestamp in milliseconds.
*
* @public
* @returns {number}
*/
export function getTimestamp(): number;
/**
* Returns the abbreviated weekday name for a date.
*
* @public
* @param {Date} date
* @returns {string}
*/
export function getShortDay(date: Date): string;
/**
* Returns the day of the month for a date.
*
* @public
* @param {Date} date
* @returns {number}
*/
export function getDate(date: Date): number;
/**
* Returns the ordinal suffix for a date's day of the month.
*
* @public
* @param {Date} date
* @returns {string}
*/
export function getDateOrdinal(date: Date): string;
/**
* Returns the abbreviated month name for a date.
*
* @public
* @param {Date} date
* @returns {string}
*/
export function getShortMonth(date: Date): string;
/**
* Returns the full year for a date.
*
* @public
* @param {Date} date
* @returns {number}
*/
export function getYear(date: Date): number;