Skip to content

Commit

Permalink
Remove roundUp flag from formatTimeString function
Browse files Browse the repository at this point in the history
So when you set e.g. 70 years ago in the To field of the date
range with "Round to the year" active, the To field's value is rounded
up. So instead of:

Jan 1, 1949 @ 00:00:00.000

It's

Jan 1, 1949 @ 23:59:59.999

Since now this date is less then 70 years in the past, moment.js fromNow
displays 69 years
  • Loading branch information
kertal committed Apr 12, 2019
1 parent 0c3c206 commit f044353
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export function EuiDatePopoverButton(props) {
data-test-subj={`superDatePicker${position}DatePopoverButton`}
{...buttonProps}
>
{formatTimeString(value, dateFormat, roundUp)}
{formatTimeString(value, dateFormat)}
</button>
);

Expand Down

0 comments on commit f044353

Please sign in to comment.