//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;

use crate::*;

/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsdateformatterstyle?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSDateFormatterStyle(pub NSUInteger);
impl NSDateFormatterStyle {
    #[doc(alias = "NSDateFormatterNoStyle")]
    pub const NoStyle: Self = Self(0);
    #[doc(alias = "NSDateFormatterShortStyle")]
    pub const ShortStyle: Self = Self(1);
    #[doc(alias = "NSDateFormatterMediumStyle")]
    pub const MediumStyle: Self = Self(2);
    #[doc(alias = "NSDateFormatterLongStyle")]
    pub const LongStyle: Self = Self(3);
    #[doc(alias = "NSDateFormatterFullStyle")]
    pub const FullStyle: Self = Self(4);
}

unsafe impl Encode for NSDateFormatterStyle {
    const ENCODING: Encoding = NSUInteger::ENCODING;
}

unsafe impl RefEncode for NSDateFormatterStyle {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsdateformatterbehavior?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSDateFormatterBehavior(pub NSUInteger);
impl NSDateFormatterBehavior {
    #[doc(alias = "NSDateFormatterBehaviorDefault")]
    pub const BehaviorDefault: Self = Self(0);
    #[doc(alias = "NSDateFormatterBehavior10_0")]
    pub const Behavior10_0: Self = Self(1000);
    #[doc(alias = "NSDateFormatterBehavior10_4")]
    pub const Behavior10_4: Self = Self(1040);
}

unsafe impl Encode for NSDateFormatterBehavior {
    const ENCODING: Encoding = NSUInteger::ENCODING;
}

unsafe impl RefEncode for NSDateFormatterBehavior {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsdateformatter?language=objc)
    #[unsafe(super(NSFormatter, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "NSFormatter")]
    pub struct NSDateFormatter;
);

#[cfg(feature = "NSFormatter")]
unsafe impl Send for NSDateFormatter {}

#[cfg(feature = "NSFormatter")]
unsafe impl Sync for NSDateFormatter {}

#[cfg(all(feature = "NSFormatter", feature = "NSObject"))]
extern_conformance!(
    unsafe impl NSCoding for NSDateFormatter {}
);

#[cfg(all(feature = "NSFormatter", feature = "NSObject"))]
extern_conformance!(
    unsafe impl NSCopying for NSDateFormatter {}
);

#[cfg(all(feature = "NSFormatter", feature = "NSObject"))]
unsafe impl CopyingHelper for NSDateFormatter {
    type Result = Self;
}

#[cfg(feature = "NSFormatter")]
extern_conformance!(
    unsafe impl NSObjectProtocol for NSDateFormatter {}
);

#[cfg(feature = "NSFormatter")]
impl NSDateFormatter {
    extern_methods!(
        #[unsafe(method(formattingContext))]
        #[unsafe(method_family = none)]
        pub fn formattingContext(&self) -> NSFormattingContext;

        /// Setter for [`formattingContext`][Self::formattingContext].
        #[unsafe(method(setFormattingContext:))]
        #[unsafe(method_family = none)]
        pub fn setFormattingContext(&self, formatting_context: NSFormattingContext);

        #[cfg(all(feature = "NSError", feature = "NSRange", feature = "NSString"))]
        /// # Safety
        ///
        /// - `obj` should be of the correct type.
        /// - `rangep` must be a valid pointer or null.
        #[unsafe(method(getObjectValue:forString:range:error:_))]
        #[unsafe(method_family = none)]
        pub unsafe fn getObjectValue_forString_range_error(
            &self,
            obj: Option<&mut Option<Retained<AnyObject>>>,
            string: &NSString,
            rangep: *mut NSRange,
        ) -> Result<(), Retained<NSError>>;

        #[cfg(all(feature = "NSDate", feature = "NSString"))]
        #[unsafe(method(stringFromDate:))]
        #[unsafe(method_family = none)]
        pub fn stringFromDate(&self, date: &NSDate) -> Retained<NSString>;

        #[cfg(all(feature = "NSDate", feature = "NSString"))]
        #[unsafe(method(dateFromString:))]
        #[unsafe(method_family = none)]
        pub fn dateFromString(&self, string: &NSString) -> Option<Retained<NSDate>>;

        #[cfg(all(feature = "NSDate", feature = "NSString"))]
        #[unsafe(method(localizedStringFromDate:dateStyle:timeStyle:))]
        #[unsafe(method_family = none)]
        pub fn localizedStringFromDate_dateStyle_timeStyle(
            date: &NSDate,
            dstyle: NSDateFormatterStyle,
            tstyle: NSDateFormatterStyle,
        ) -> Retained<NSString>;

        #[cfg(all(feature = "NSLocale", feature = "NSString"))]
        #[unsafe(method(dateFormatFromTemplate:options:locale:))]
        #[unsafe(method_family = none)]
        pub fn dateFormatFromTemplate_options_locale(
            tmplate: &NSString,
            opts: NSUInteger,
            locale: Option<&NSLocale>,
        ) -> Option<Retained<NSString>>;

        #[unsafe(method(defaultFormatterBehavior))]
        #[unsafe(method_family = none)]
        pub fn defaultFormatterBehavior() -> NSDateFormatterBehavior;

        /// Setter for [`defaultFormatterBehavior`][Self::defaultFormatterBehavior].
        #[unsafe(method(setDefaultFormatterBehavior:))]
        #[unsafe(method_family = none)]
        pub fn setDefaultFormatterBehavior(default_formatter_behavior: NSDateFormatterBehavior);

        #[cfg(feature = "NSString")]
        #[unsafe(method(setLocalizedDateFormatFromTemplate:))]
        #[unsafe(method_family = none)]
        pub fn setLocalizedDateFormatFromTemplate(&self, date_format_template: &NSString);

        #[cfg(feature = "NSString")]
        #[unsafe(method(dateFormat))]
        #[unsafe(method_family = none)]
        pub fn dateFormat(&self) -> Retained<NSString>;

        #[cfg(feature = "NSString")]
        /// Setter for [`dateFormat`][Self::dateFormat].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setDateFormat:))]
        #[unsafe(method_family = none)]
        pub fn setDateFormat(&self, date_format: Option<&NSString>);

        #[unsafe(method(dateStyle))]
        #[unsafe(method_family = none)]
        pub fn dateStyle(&self) -> NSDateFormatterStyle;

        /// Setter for [`dateStyle`][Self::dateStyle].
        #[unsafe(method(setDateStyle:))]
        #[unsafe(method_family = none)]
        pub fn setDateStyle(&self, date_style: NSDateFormatterStyle);

        #[unsafe(method(timeStyle))]
        #[unsafe(method_family = none)]
        pub fn timeStyle(&self) -> NSDateFormatterStyle;

        /// Setter for [`timeStyle`][Self::timeStyle].
        #[unsafe(method(setTimeStyle:))]
        #[unsafe(method_family = none)]
        pub fn setTimeStyle(&self, time_style: NSDateFormatterStyle);

        #[cfg(feature = "NSLocale")]
        #[unsafe(method(locale))]
        #[unsafe(method_family = none)]
        pub fn locale(&self) -> Retained<NSLocale>;

        #[cfg(feature = "NSLocale")]
        /// Setter for [`locale`][Self::locale].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setLocale:))]
        #[unsafe(method_family = none)]
        pub fn setLocale(&self, locale: Option<&NSLocale>);

        #[unsafe(method(generatesCalendarDates))]
        #[unsafe(method_family = none)]
        pub fn generatesCalendarDates(&self) -> bool;

        /// Setter for [`generatesCalendarDates`][Self::generatesCalendarDates].
        #[unsafe(method(setGeneratesCalendarDates:))]
        #[unsafe(method_family = none)]
        pub fn setGeneratesCalendarDates(&self, generates_calendar_dates: bool);

        #[unsafe(method(formatterBehavior))]
        #[unsafe(method_family = none)]
        pub fn formatterBehavior(&self) -> NSDateFormatterBehavior;

        /// Setter for [`formatterBehavior`][Self::formatterBehavior].
        #[unsafe(method(setFormatterBehavior:))]
        #[unsafe(method_family = none)]
        pub fn setFormatterBehavior(&self, formatter_behavior: NSDateFormatterBehavior);

        #[cfg(feature = "NSTimeZone")]
        #[unsafe(method(timeZone))]
        #[unsafe(method_family = none)]
        pub fn timeZone(&self) -> Retained<NSTimeZone>;

        #[cfg(feature = "NSTimeZone")]
        /// Setter for [`timeZone`][Self::timeZone].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setTimeZone:))]
        #[unsafe(method_family = none)]
        pub fn setTimeZone(&self, time_zone: Option<&NSTimeZone>);

        #[cfg(feature = "NSCalendar")]
        #[unsafe(method(calendar))]
        #[unsafe(method_family = none)]
        pub fn calendar(&self) -> Retained<NSCalendar>;

        #[cfg(feature = "NSCalendar")]
        /// Setter for [`calendar`][Self::calendar].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setCalendar:))]
        #[unsafe(method_family = none)]
        pub fn setCalendar(&self, calendar: Option<&NSCalendar>);

        #[unsafe(method(isLenient))]
        #[unsafe(method_family = none)]
        pub fn isLenient(&self) -> bool;

        /// Setter for [`isLenient`][Self::isLenient].
        #[unsafe(method(setLenient:))]
        #[unsafe(method_family = none)]
        pub fn setLenient(&self, lenient: bool);

        #[cfg(feature = "NSDate")]
        #[unsafe(method(twoDigitStartDate))]
        #[unsafe(method_family = none)]
        pub fn twoDigitStartDate(&self) -> Option<Retained<NSDate>>;

        #[cfg(feature = "NSDate")]
        /// Setter for [`twoDigitStartDate`][Self::twoDigitStartDate].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setTwoDigitStartDate:))]
        #[unsafe(method_family = none)]
        pub fn setTwoDigitStartDate(&self, two_digit_start_date: Option<&NSDate>);

        #[cfg(feature = "NSDate")]
        #[unsafe(method(defaultDate))]
        #[unsafe(method_family = none)]
        pub fn defaultDate(&self) -> Option<Retained<NSDate>>;

        #[cfg(feature = "NSDate")]
        /// Setter for [`defaultDate`][Self::defaultDate].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setDefaultDate:))]
        #[unsafe(method_family = none)]
        pub fn setDefaultDate(&self, default_date: Option<&NSDate>);

        #[cfg(all(feature = "NSArray", feature = "NSString"))]
        #[unsafe(method(eraSymbols))]
        #[unsafe(method_family = none)]
        pub fn eraSymbols(&self) -> Retained<NSArray<NSString>>;

        #[cfg(all(feature = "NSArray", feature = "NSString"))]
        /// Setter for [`eraSymbols`][Self::eraSymbols].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setEraSymbols:))]
        #[unsafe(method_family = none)]
        pub fn setEraSymbols(&self, era_symbols: Option<&NSArray<NSString>>);

        #[cfg(all(feature = "NSArray", feature = "NSString"))]
        #[unsafe(method(monthSymbols))]
        #[unsafe(method_family = none)]
        pub fn monthSymbols(&self) -> Retained<NSArray<NSString>>;

        #[cfg(all(feature = "NSArray", feature = "NSString"))]
        /// Setter for [`monthSymbols`][Self::monthSymbols].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setMonthSymbols:))]
        #[unsafe(method_family = none)]
        pub fn setMonthSymbols(&self, month_symbols: Option<&NSArray<NSString>>);

        #[cfg(all(feature = "NSArray", feature = "NSString"))]
        #[unsafe(method(shortMonthSymbols))]
        #[unsafe(method_family = none)]
        pub fn shortMonthSymbols(&self) -> Retained<NSArray<NSString>>;

        #[cfg(all(feature = "NSArray", feature = "NSString"))]
        /// Setter for [`shortMonthSymbols`][Self::shortMonthSymbols].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setShortMonthSymbols:))]
        #[unsafe(method_family = none)]
        pub fn setShortMonthSymbols(&self, short_month_symbols: Option<&NSArray<NSString>>);

        #[cfg(all(feature = "NSArray", feature = "NSString"))]
        #[unsafe(method(weekdaySymbols))]
        #[unsafe(method_family = none)]
        pub fn weekdaySymbols(&self) -> Retained<NSArray<NSString>>;

        #[cfg(all(feature = "NSArray", feature = "NSString"))]
        /// Setter for [`weekdaySymbols`][Self::weekdaySymbols].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setWeekdaySymbols:))]
        #[unsafe(method_family = none)]
        pub fn setWeekdaySymbols(&self, weekday_symbols: Option<&NSArray<NSString>>);

        #[cfg(all(feature = "NSArray", feature = "NSString"))]
        #[unsafe(method(shortWeekdaySymbols))]
        #[unsafe(method_family = none)]
        pub fn shortWeekdaySymbols(&self) -> Retained<NSArray<NSString>>;

        #[cfg(all(feature = "NSArray", feature = "NSString"))]
        /// Setter for [`shortWeekdaySymbols`][Self::shortWeekdaySymbols].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setShortWeekdaySymbols:))]
        #[unsafe(method_family = none)]
        pub fn setShortWeekdaySymbols(&self, short_weekday_symbols: Option<&NSArray<NSString>>);

        #[cfg(feature = "NSString")]
        #[unsafe(method(AMSymbol))]
        #[unsafe(method_family = none)]
        pub fn AMSymbol(&self) -> Retained<NSString>;

        #[cfg(feature = "NSString")]
        /// Setter for [`AMSymbol`][Self::AMSymbol].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setAMSymbol:))]
        #[unsafe(method_family = none)]
        pub fn setAMSymbol(&self, am_symbol: Option<&NSString>);

        #[cfg(feature = "NSString")]
        #[unsafe(method(PMSymbol))]
        #[unsafe(method_family = none)]
        pub fn PMSymbol(&self) -> Retained<NSString>;

        #[cfg(feature = "NSString")]
        /// Setter for [`PMSymbol`][Self::PMSymbol].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setPMSymbol:))]
        #[unsafe(method_family = none)]
        pub fn setPMSymbol(&self, pm_symbol: Option<&NSString>);

        #[cfg(all(feature = "NSArray", feature = "NSString"))]
        #[unsafe(method(longEraSymbols))]
        #[unsafe(method_family = none)]
        pub fn longEraSymbols(&self) -> Retained<NSArray<NSString>>;

        #[cfg(all(feature = "NSArray", feature = "NSString"))]
        /// Setter for [`longEraSymbols`][Self::longEraSymbols].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setLongEraSymbols:))]
        #[unsafe(method_family = none)]
        pub fn setLongEraSymbols(&self, long_era_symbols: Option<&NSArray<NSString>>);

        #[cfg(all(feature = "NSArray", feature = "NSString"))]
        #[unsafe(method(veryShortMonthSymbols))]
        #[unsafe(method_family = none)]
        pub fn veryShortMonthSymbols(&self) -> Retained<NSArray<NSString>>;

        #[cfg(all(feature = "NSArray", feature = "NSString"))]
        /// Setter for [`veryShortMonthSymbols`][Self::veryShortMonthSymbols].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setVeryShortMonthSymbols:))]
        #[unsafe(method_family = none)]
        pub fn setVeryShortMonthSymbols(
            &self,
            very_short_month_symbols: Option<&NSArray<NSString>>,
        );

        #[cfg(all(feature = "NSArray", feature = "NSString"))]
        #[unsafe(method(standaloneMonthSymbols))]
        #[unsafe(method_family = none)]
        pub fn standaloneMonthSymbols(&self) -> Retained<NSArray<NSString>>;

        #[cfg(all(feature = "NSArray", feature = "NSString"))]
        /// Setter for [`standaloneMonthSymbols`][Self::standaloneMonthSymbols].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setStandaloneMonthSymbols:))]
        #[unsafe(method_family = none)]
        pub fn setStandaloneMonthSymbols(
            &self,
            standalone_month_symbols: Option<&NSArray<NSString>>,
        );

        #[cfg(all(feature = "NSArray", feature = "NSString"))]
        #[unsafe(method(shortStandaloneMonthSymbols))]
        #[unsafe(method_family = none)]
        pub fn shortStandaloneMonthSymbols(&self) -> Retained<NSArray<NSString>>;

        #[cfg(all(feature = "NSArray", feature = "NSString"))]
        /// Setter for [`shortStandaloneMonthSymbols`][Self::shortStandaloneMonthSymbols].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setShortStandaloneMonthSymbols:))]
        #[unsafe(method_family = none)]
        pub fn setShortStandaloneMonthSymbols(
            &self,
            short_standalone_month_symbols: Option<&NSArray<NSString>>,
        );

        #[cfg(all(feature = "NSArray", feature = "NSString"))]
        #[unsafe(method(veryShortStandaloneMonthSymbols))]
        #[unsafe(method_family = none)]
        pub fn veryShortStandaloneMonthSymbols(&self) -> Retained<NSArray<NSString>>;

        #[cfg(all(feature = "NSArray", feature = "NSString"))]
        /// Setter for [`veryShortStandaloneMonthSymbols`][Self::veryShortStandaloneMonthSymbols].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setVeryShortStandaloneMonthSymbols:))]
        #[unsafe(method_family = none)]
        pub fn setVeryShortStandaloneMonthSymbols(
            &self,
            very_short_standalone_month_symbols: Option<&NSArray<NSString>>,
        );

        #[cfg(all(feature = "NSArray", feature = "NSString"))]
        #[unsafe(method(veryShortWeekdaySymbols))]
        #[unsafe(method_family = none)]
        pub fn veryShortWeekdaySymbols(&self) -> Retained<NSArray<NSString>>;

        #[cfg(all(feature = "NSArray", feature = "NSString"))]
        /// Setter for [`veryShortWeekdaySymbols`][Self::veryShortWeekdaySymbols].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setVeryShortWeekdaySymbols:))]
        #[unsafe(method_family = none)]
        pub fn setVeryShortWeekdaySymbols(
            &self,
            very_short_weekday_symbols: Option<&NSArray<NSString>>,
        );

        #[cfg(all(feature = "NSArray", feature = "NSString"))]
        #[unsafe(method(standaloneWeekdaySymbols))]
        #[unsafe(method_family = none)]
        pub fn standaloneWeekdaySymbols(&self) -> Retained<NSArray<NSString>>;

        #[cfg(all(feature = "NSArray", feature = "NSString"))]
        /// Setter for [`standaloneWeekdaySymbols`][Self::standaloneWeekdaySymbols].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setStandaloneWeekdaySymbols:))]
        #[unsafe(method_family = none)]
        pub fn setStandaloneWeekdaySymbols(
            &self,
            standalone_weekday_symbols: Option<&NSArray<NSString>>,
        );

        #[cfg(all(feature = "NSArray", feature = "NSString"))]
        #[unsafe(method(shortStandaloneWeekdaySymbols))]
        #[unsafe(method_family = none)]
        pub fn shortStandaloneWeekdaySymbols(&self) -> Retained<NSArray<NSString>>;

        #[cfg(all(feature = "NSArray", feature = "NSString"))]
        /// Setter for [`shortStandaloneWeekdaySymbols`][Self::shortStandaloneWeekdaySymbols].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setShortStandaloneWeekdaySymbols:))]
        #[unsafe(method_family = none)]
        pub fn setShortStandaloneWeekdaySymbols(
            &self,
            short_standalone_weekday_symbols: Option<&NSArray<NSString>>,
        );

        #[cfg(all(feature = "NSArray", feature = "NSString"))]
        #[unsafe(method(veryShortStandaloneWeekdaySymbols))]
        #[unsafe(method_family = none)]
        pub fn veryShortStandaloneWeekdaySymbols(&self) -> Retained<NSArray<NSString>>;

        #[cfg(all(feature = "NSArray", feature = "NSString"))]
        /// Setter for [`veryShortStandaloneWeekdaySymbols`][Self::veryShortStandaloneWeekdaySymbols].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setVeryShortStandaloneWeekdaySymbols:))]
        #[unsafe(method_family = none)]
        pub fn setVeryShortStandaloneWeekdaySymbols(
            &self,
            very_short_standalone_weekday_symbols: Option<&NSArray<NSString>>,
        );

        #[cfg(all(feature = "NSArray", feature = "NSString"))]
        #[unsafe(method(quarterSymbols))]
        #[unsafe(method_family = none)]
        pub fn quarterSymbols(&self) -> Retained<NSArray<NSString>>;

        #[cfg(all(feature = "NSArray", feature = "NSString"))]
        /// Setter for [`quarterSymbols`][Self::quarterSymbols].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setQuarterSymbols:))]
        #[unsafe(method_family = none)]
        pub fn setQuarterSymbols(&self, quarter_symbols: Option<&NSArray<NSString>>);

        #[cfg(all(feature = "NSArray", feature = "NSString"))]
        #[unsafe(method(shortQuarterSymbols))]
        #[unsafe(method_family = none)]
        pub fn shortQuarterSymbols(&self) -> Retained<NSArray<NSString>>;

        #[cfg(all(feature = "NSArray", feature = "NSString"))]
        /// Setter for [`shortQuarterSymbols`][Self::shortQuarterSymbols].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setShortQuarterSymbols:))]
        #[unsafe(method_family = none)]
        pub fn setShortQuarterSymbols(&self, short_quarter_symbols: Option<&NSArray<NSString>>);

        #[cfg(all(feature = "NSArray", feature = "NSString"))]
        #[unsafe(method(standaloneQuarterSymbols))]
        #[unsafe(method_family = none)]
        pub fn standaloneQuarterSymbols(&self) -> Retained<NSArray<NSString>>;

        #[cfg(all(feature = "NSArray", feature = "NSString"))]
        /// Setter for [`standaloneQuarterSymbols`][Self::standaloneQuarterSymbols].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setStandaloneQuarterSymbols:))]
        #[unsafe(method_family = none)]
        pub fn setStandaloneQuarterSymbols(
            &self,
            standalone_quarter_symbols: Option<&NSArray<NSString>>,
        );

        #[cfg(all(feature = "NSArray", feature = "NSString"))]
        #[unsafe(method(shortStandaloneQuarterSymbols))]
        #[unsafe(method_family = none)]
        pub fn shortStandaloneQuarterSymbols(&self) -> Retained<NSArray<NSString>>;

        #[cfg(all(feature = "NSArray", feature = "NSString"))]
        /// Setter for [`shortStandaloneQuarterSymbols`][Self::shortStandaloneQuarterSymbols].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setShortStandaloneQuarterSymbols:))]
        #[unsafe(method_family = none)]
        pub fn setShortStandaloneQuarterSymbols(
            &self,
            short_standalone_quarter_symbols: Option<&NSArray<NSString>>,
        );

        #[cfg(feature = "NSDate")]
        #[unsafe(method(gregorianStartDate))]
        #[unsafe(method_family = none)]
        pub fn gregorianStartDate(&self) -> Option<Retained<NSDate>>;

        #[cfg(feature = "NSDate")]
        /// Setter for [`gregorianStartDate`][Self::gregorianStartDate].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setGregorianStartDate:))]
        #[unsafe(method_family = none)]
        pub fn setGregorianStartDate(&self, gregorian_start_date: Option<&NSDate>);

        #[unsafe(method(doesRelativeDateFormatting))]
        #[unsafe(method_family = none)]
        pub fn doesRelativeDateFormatting(&self) -> bool;

        /// Setter for [`doesRelativeDateFormatting`][Self::doesRelativeDateFormatting].
        #[unsafe(method(setDoesRelativeDateFormatting:))]
        #[unsafe(method_family = none)]
        pub fn setDoesRelativeDateFormatting(&self, does_relative_date_formatting: bool);
    );
}

/// Methods declared on superclass `NSObject`.
#[cfg(feature = "NSFormatter")]
impl NSDateFormatter {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub fn new() -> Retained<Self>;
    );
}

#[cfg(feature = "NSFormatter")]
impl DefaultRetained for NSDateFormatter {
    #[inline]
    fn default_retained() -> Retained<Self> {
        Self::new()
    }
}

/// NSDateFormatterCompatibility.
#[cfg(feature = "NSFormatter")]
impl NSDateFormatter {
    extern_methods!(
        #[cfg(feature = "NSString")]
        #[deprecated = "Create an NSDateFormatter with `init` and set the dateFormat property instead."]
        #[unsafe(method(initWithDateFormat:allowNaturalLanguage:))]
        #[unsafe(method_family = init)]
        pub fn initWithDateFormat_allowNaturalLanguage(
            this: Allocated<Self>,
            format: &NSString,
            flag: bool,
        ) -> Retained<Self>;

        #[deprecated = "There is no replacement"]
        #[unsafe(method(allowsNaturalLanguage))]
        #[unsafe(method_family = none)]
        pub fn allowsNaturalLanguage(&self) -> bool;
    );
}
