in packages/@fbcmobile-ui/Utils/DateUtils.js [46:60]
export function getReadableDateString(
date: moment$Moment,
locale: string,
): React.Node {
const today = moment();
const tomorrow = moment(today).add(1, 'd');
if (today.isSame(date, 'day')) {
return <fbt desc="Date label shown as today">Today</fbt>;
} else if (tomorrow.isSame(date, 'day')) {
return <fbt desc="Date label shown as tomorrow">Tomorrow</fbt>;
}
return date.locale(locale).format('MMM DD');
}