style: clock period (#601)

* style: tweaks to studio override

* style: improvements to 12 hour format
This commit is contained in:
Carlos Valente
2023-11-20 09:53:35 +01:00
committed by GitHub
parent 2316bbebac
commit 1b55dbc170
16 changed files with 108 additions and 39 deletions
@@ -26,4 +26,14 @@ describe('formatTime()', () => {
const time = formatTime(ms);
expect(time).toStrictEqual('...');
});
it('shows 12h format without times', () => {
const ms = 13 * 60 * 60 * 1000;
const options = {
showSeconds: false,
format: 'hh:mm a',
};
const time = formatTime(ms, options, () => '12');
expect(time).toStrictEqual('01:00 PM');
});
});