Skip to content

Commit

Permalink
Fixed linter warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
1ec5 committed Dec 17, 2023
1 parent 6613bc8 commit cba209e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/ui/fields/date.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,17 +190,17 @@ export function uiFieldDate(field, context) {
let value = '';
let year = parseInt(context.cleanTagValue(yearValue), 10);
if (eraValue === bceName) {
value += '-' + (year - 1 + '').padStart(4, '0');
value += '-' + String(year - 1).padStart(4, '0');
} else {
value += (year + '').padStart(4, '0');
value += String(year).padStart(4, '0');
}
let month = context.cleanTagValue(monthValue);
if (monthNames.includes(month)) {
month = monthNames.indexOf(month) + 1;
value += '-' + (month + '').padStart(2, '0');
value += '-' + String(month).padStart(2, '0');
let day = parseInt(context.cleanTagValue(dayValue), 10);
if (!isNaN(day)) {
value += '-' + (day + '').padStart(2, '0');
value += '-' + String(day).padStart(2, '0');
}
}
tag[field.key] = value;
Expand Down

0 comments on commit cba209e

Please sign in to comment.