@chayns-components/date
Version:
A set of beautiful React components for developing your own applications with chayns.
20 lines (19 loc) • 860 B
TypeScript
import { Language } from 'chayns-api';
import { UseDateInfoOptions } from '../types/dateinfo';
export declare const getDateInfo: ({ date, shouldShowYear, shouldShowTime, shouldShowDayOfWeek, shouldShowRelativeDayOfWeek, shouldUseShortText, }: Omit<UseDateInfoOptions, "shouldShowDateToNowDifference" & "preText">) => string;
interface GetTimeTillNow {
date: Date;
currentDate: Date;
language: Language;
}
export declare const getTimeTillNow: ({ date, currentDate, language, }: GetTimeTillNow) => string;
interface GetFormattedTimeOptions {
date: Date;
shouldShowSeconds?: boolean;
}
export declare const getFormattedTime: ({ date, shouldShowSeconds, }: GetFormattedTimeOptions) => string;
interface GetTimeStringProps {
language?: Language;
}
export declare const getTimeString: ({ language }: GetTimeStringProps) => string;
export {};