🔀 Merge pull request #1192 from BhasherBEL/master

Add lang option for public holidays
This commit is contained in:
Alicia Sykes
2023-07-15 12:13:29 +01:00
committed by GitHub
2 changed files with 3 additions and 1 deletions

View File

@@ -90,7 +90,7 @@ export default {
const formatType = (ht) => capitalize(ht.replaceAll('_', ' '));
holidays.forEach((holiday) => {
results.push({
name: holiday.name[0].text,
name: holiday.name.filter(p => p.lang == this.options.lang)[0].text || holiday.name[0].text,
date: makeDate(holiday.date),
type: formatType(holiday.holidayType),
observed: holiday.observedOn ? makeDate(holiday.observedOn) : '',