Skip to content

@technobuddha > library > Time > Relative Time

Type Alias: RelativeTimeOptions

ts
type RelativeTimeOptions = {
  mdFormat?: string;
  timeFormat?: string;
  todayTomorrowYesterday?: boolean;
  ymdFormat?: string;
};

Defined in: relative-time.ts:14

Options for the relativeTime function

Properties

PropertyTypeDescriptionDefined in
mdFormat?stringPassed to formatDate to display a month and daysrc/relative-time.ts:22
timeFormat?stringPassed to formatDate to display a timesrc/relative-time.ts:18
todayTomorrowYesterday?booleanDescribe the time difference as a time on a nearby daysrc/relative-time.ts:16
ymdFormat?stringPassed to formatDate to display a year, month and daysrc/relative-time.ts:20