Skip to content

Commit c92253c

Browse files
committed
fix(dates): dateFieldName returns weekday for 'E' specifier
1 parent b98abb4 commit c92253c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/dates/date-field-name.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { localeInfo } from '../cldr';
22

33
const MONTH = 'month';
4-
const DAY = 'day';
54
const HOUR = 'hour';
65
const ZONE = 'zone';
76
const WEEKDAY = 'weekday';
@@ -11,8 +10,8 @@ const dateFieldMap = {
1110
'y': 'year',
1211
'M': MONTH,
1312
'L': MONTH,
14-
'd': DAY,
15-
'E': DAY,
13+
'd': 'day',
14+
'E': 'weekday',
1615
'h': HOUR,
1716
'H': HOUR,
1817
'm': 'minute',

test/dates.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ describe('dateFieldName', () => {
4242
});
4343

4444
it('should return placeholder for wide day name', () => {
45-
expect(dateFieldName("EEEE", "bg")).toEqual("ден");
45+
expect(dateFieldName("EEEE")).toEqual("day of the week");
46+
expect(dateFieldName("EEEE", "bg")).toEqual("ден от седмицата");
4647
});
4748

4849
it('should return placeholder for short day name', () => {

0 commit comments

Comments
 (0)