signoz/frontend/src/lib/convertDateToAmAndPm.ts
Palash Gupta e62e541fc4
FE: added more eslint rule (#2090)
* chore: arrow-body-style func-style is added in the rule

* fix: linting issues fixed

Co-authored-by: Srikanth Chekuri <srikanth.chekuri92@gmail.com>
2023-01-24 18:53:04 +05:30

10 lines
205 B
TypeScript

const convertDateToAmAndPm = (date: Date): string =>
date.toLocaleString('en-US', {
hour: '2-digit',
minute: 'numeric',
second: 'numeric',
hour12: true,
});
export default convertDateToAmAndPm;