Skip to content
Snippets Groups Projects
Commit affb1bb9 authored by Tom Robinson's avatar Tom Robinson
Browse files

Fix flow

parent 9cd4de95
No related branches found
No related tags found
No related merge requests found
......@@ -405,7 +405,7 @@ export function formatDateTimeWithUnit(
options = {
date_style: DEFAULT_DATE_STYLE,
time_style: DEFAULT_TIME_STYLE,
time_enabled: hasHour(unit),
time_enabled: hasHour(unit) ? "minutes" : null,
...options,
};
......@@ -413,11 +413,13 @@ export function formatDateTimeWithUnit(
let timeFormat = options.time_format;
if (!dateFormat) {
// $FlowFixMe: date_style default set above
dateFormat = getDateFormatFromStyle(options.date_style, unit);
}
if (!timeFormat) {
timeFormat = getTimeFormatFromStyle(
// $FlowFixMe: time_style default set above
options.time_style,
unit,
options.time_enabled,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment