Files
threshold-ui/addons/core/addon/helpers/format-date-iso.js
T
2024-05-31 11:29:24 -07:00

15 lines
345 B
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/
import { helper } from '@ember/component/helper';
/**
* Takes a `Date` instance and returns a string formatted in ISO,
* e.g. "2020-01-01T00:00:00.999Z".
*/
export default helper(function formatDateIso(params /*, hash*/) {
return params[0]?.toISOString();
});