We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ed39cc4 commit 014a293Copy full SHA for 014a293
1 file changed
packages/react-date-picker/src/shared/dateFormatter.spec.ts
@@ -0,0 +1,23 @@
1
+import { describe, expect, it } from 'vitest';
2
+
3
+import { formatMonth, formatShortMonth } from './dateFormatter.js';
4
5
+describe('formatMonth', () => {
6
+ it('returns proper month name', () => {
7
+ const date = new Date(2017, 1, 1);
8
9
+ const formattedDate = formatMonth('en-US', date);
10
11
+ expect(formattedDate).toBe('February');
12
+ });
13
+});
14
15
+describe('formatShortMonth', () => {
16
+ it('returns proper short month name', () => {
17
18
19
+ const formattedDate = formatShortMonth('en-US', date);
20
21
+ expect(formattedDate).toBe('Feb');
22
23
0 commit comments