mirror of
https://github.com/elastic/kibana.git
synced 2025-04-25 02:09:32 -04:00
Migrates the client side plugin of transforms to NP. - Gets rid of the last parts of the shim (http, documentation links) - Moves the plugin from x-pack/legacy/plugins/transform/public to x-pack/plugins/transform - Creates a custom mock for appDependencies based on NP services - Fixes jest tests to get rid of all act() related warnings
22 lines
687 B
TypeScript
22 lines
687 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.
|
|
*/
|
|
|
|
// utility functions for handling dates
|
|
|
|
// @ts-ignore
|
|
import { formatDate } from '@elastic/eui/lib/services/format';
|
|
|
|
export function formatHumanReadableDate(ts: number) {
|
|
return formatDate(ts, 'MMMM Do YYYY');
|
|
}
|
|
|
|
export function formatHumanReadableDateTime(ts: number) {
|
|
return formatDate(ts, 'MMMM Do YYYY, HH:mm');
|
|
}
|
|
|
|
export function formatHumanReadableDateTimeSeconds(ts: number) {
|
|
return formatDate(ts, 'MMMM Do YYYY, HH:mm:ss');
|
|
}
|