nerdexam
Salesforce

PDII · Question #368

A developer is creating a Lightning web component to display a calendar. The component will be used in multiple countries. In some locales, the first day of the week is a Monday, or a Saturday, or a…

The correct answer is C. Import the @salesforce/i18n module and use the firstDayOfWeek internationalization property. See the full explanation below for the reasoning.

Question

A developer is creating a Lightning web component to display a calendar. The component will be used in multiple countries. In some locales, the first day of the week is a Monday, or a Saturday, or a Sunday. What should the developer do to ensure the calendar displays accurately for users in every locale?

Options

  • AUse UserInfo.getLocale() in the component.
  • BUse a custom metadata type to store key/value pairs.
  • CImport the @salesforce/i18n module and use the firstDayOfWeek internationalization property.
  • DQuery the FirstDayOfWeek field from the Locale for the current user.

How the community answered

(19 responses)
  • A
    11% (2)
  • C
    84% (16)
  • D
    5% (1)

Community Discussion

No community discussion yet for this question.

Full PDII Practice