kibana/x-pack/plugins/observability/public/utils/date.ts
Cauê Marcondes 3374b2d3b0
[Observability] Change appLink passing the date range (#71259)
* changing apm appLink

* changing apm appLink

* removing title from api

* adding absolute and relative times

* addressing pr comments

* addressing pr comments

* addressing pr comments

* fixing TS issues

* addressing pr comments

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-14 11:05:48 +02:00

14 lines
442 B
TypeScript

/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import datemath from '@elastic/datemath';
export function getAbsoluteTime(range: string, opts = {}) {
const parsed = datemath.parse(range, opts);
if (parsed) {
return parsed.valueOf();
}
}