Exemplo n.º 1
0
        /// <summary>
        /// Gets the inclusive upper limit of time that this rule set applies to.
        /// </summary>
        /// <param name="savings">The daylight savings value during the final zone interval.</param>
        /// <returns>The <see cref="LocalInstant"/> of the upper limit for this rule set.</returns>
        internal Instant GetUpperLimit(Offset savings)
        {
            if (IsInfinite)
            {
                return(Instant.AfterMaxValue);
            }
            var localInstant = upperYearOffset.GetOccurrenceForYear(upperYear);
            var offset       = upperYearOffset.GetRuleOffset(StandardOffset, savings);

            return(localInstant.SafeMinus(offset));
        }