public virtual DurationFormatter WithLocale(String localeName_0)
 {
     if (!localeName_0.Equals(this.localeName))
     {
         PeriodFormatter newFormatter = formatter.WithLocale(localeName_0);
         PeriodBuilder   newBuilder   = builder.WithLocale(localeName_0);
         DateFormatter   newFallback  = (fallback == null) ? null : fallback
                                        .WithLocale(localeName_0);
         return(new BasicDurationFormatter(newFormatter, newBuilder,
                                           newFallback, fallbackLimit, localeName_0, timeZone));
     }
     return(this);
 }
        /// <summary>
        /// Return a formatter based on this factory's current settings.
        /// </summary>
        ///
        /// <returns>a BasicDurationFormatter</returns>
        public virtual DurationFormatter GetFormatter()
        {
            if (f == null)
            {
                if (fallback != null)
                {
                    fallback = fallback.WithLocale(localeName).WithTimeZone(
                        timeZone);
                }
                formatter = GetPeriodFormatter().WithLocale(localeName);
                builder   = GetPeriodBuilder().WithLocale(localeName).WithTimeZone(
                    timeZone);

                f = CreateFormatter();
            }
            return(f);
        }