def day_name(self, locale=None):
if self.tz is not None and not timezones.is_utc(self.tz):<EOL><INDENT>values = self._local_timestamps()<EOL><DEDENT>else:<EOL><INDENT>values = self.asi8<EOL><DEDENT>result = fields.get_date_name_field(values, '<STR_LIT>',<EOL>locale=locale)<EOL>result = self._maybe_mask_results(result, fill_value=None)<EOL>return result<EOL>
Return the day names of the DateTimeIndex with specified locale.

.. versionadded:: 0.23.0

Parameters
----------
locale : str, optional
    Locale determining the language in which to return the day name.
    Default is English locale.

Returns
-------
Index
    Index of day names.

Examples
--------
>>> idx = pd.date_range(start='2018-01-01', freq='D', periods=3)
>>> idx
DatetimeIndex(['2018-01-01', '2018-01-02', '2018-01-03'],
              dtype='datetime64[ns]', freq='D')
>>> idx.day_name()
Index(['Monday', 'Tuesday', 'Wednesday'], dtype='object')