mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-10-16 01:33:18 +01:00
add formatting support for months grouping
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
import { describe, expect, test } from 'vitest';
|
||||
import { formatHumanReadableDuration, formatReportingDuration, formatWeekRange } from './time';
|
||||
import {
|
||||
formatHumanReadableDuration,
|
||||
formatMonth,
|
||||
formatReportingDuration,
|
||||
formatWeekRange,
|
||||
} from './time';
|
||||
|
||||
const seconds = 14 * 3600 + 45 * 60 + 6; // 14h 45m 06s
|
||||
|
||||
@@ -60,3 +65,9 @@ describe('formatWeekRange', () => {
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe('formatMonth', () => {
|
||||
test('renders the name of the month that the key covers', () => {
|
||||
expect(formatMonth('2001-02')).toBe('February 2001');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user