<commit_before>﻿#region Copyright and license information
// Copyright 2001-2009 <NAME>
// Copyright 2009-2011 <NAME>
// 
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// 
//     http://www.apache.org/licenses/LICENSE-2.0
// 
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#endregion

using System;
using NodaTime.Calendars;
using NodaTime.TimeZones;
using NodaTime.Utility;

namespace NodaTime
{
    /// <summary>
    /// A <see cref="LocalDateTime"/> in a specific time zone and with a particular offset to distinguish between otherwise-ambiguous
    /// instants. A ZonedDateTime is global, in that it maps to a single <see cref="Instant"/>.
    /// </summary>
    /// <remarks>
    /// <para>Comparisons of values can be handled in a way which is either calendar and zone sensitive or insensitive.
    /// Noda Time implements all the operators (and the <see cref="Equals(ZonedDateTime)"/> method) such that all operators other than <see cref="op_Inequality"/>
    /// will return false if asked to compare two values in different calendar systems and time zones.
    /// </para>
    /// <para>
    /// However, the <see cref="CompareTo"/> method (implementing <see cref="IComparable{T}"/>) is calendar and zone insensitive; it compares the two
    /// global instants in terms of when they actually occurred.
    /// </para>
    /// <para>
    /// It's unclear at the time of this writing whether this is the most appropriate approach, and it may change in future versions. In general,
    /// it would be a good idea for users to avoid comparing dates in different calendar systems, and indeed most users are unlikely to ever explicitly
    /// consider which calendar system they're working in anyway.
    /// </para>
    /// <para>
    /// Currently there is no real text handling support for this type. For the moment, you should 
    /// </para>
    /// </remarks>
    public struct ZonedDateTime : IEquatable<ZonedDateTime>, IComparable<ZonedDateTime>
    {
        private static readonly int TypeInitializationChecking = NodaTime.Utility.TypeInitializationChecker.RecordInitializationStart();

        private readonly LocalDateTime localDateTime;
        private readonly DateTimeZone zone;
        private readonly Offset offset;

        /// <summary>
        /// Internal constructor used by other code that has already validated and 
        /// computed the appropriate field values. No further validation is performed.
        /// </summary>
        internal ZonedDateTime(LocalDateTime localDateTime, Offset offset, DateTimeZone zone)
        {
            this.localDateTime = localDateTime;
            this.offset = offset;
            this.zone = zone;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="ZonedDateTime"/> struct.
        /// </summary>
        /// <param name="calendar">The calendar system.</param>
        /// <param name="instant">The instant.</param>
        /// <param name="zone">The time zone.</param>
        /// <exception cref="ArgumentNullException">Thrown if the <paramref name="calendar"/> or <paramref name="zone"/> is <c>null</c>.</exception>
        public ZonedDateTime(Instant instant, DateTimeZone zone, CalendarSystem calendar)
        {
            if (zone == null)<commit_msg>Delete a partial sentence in ZonedDateTime's documentation.<commit_after>﻿#region Copyright and license information
// Copyright 2001-2009 <NAME>
// Copyright 2009-2011 <NAME>
// 
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// 
//     http://www.apache.org/licenses/LICENSE-2.0
// 
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#endregion

using System;
using NodaTime.Calendars;
using NodaTime.TimeZones;
using NodaTime.Utility;

namespace NodaTime
{
    /// <summary>
    /// A <see cref="LocalDateTime"/> in a specific time zone and with a particular offset to distinguish between otherwise-ambiguous
    /// instants. A ZonedDateTime is global, in that it maps to a single <see cref="Instant"/>.
    /// </summary>
    /// <remarks>
    /// <para>Comparisons of values can be handled in a way which is either calendar and zone sensitive or insensitive.
    /// Noda Time implements all the operators (and the <see cref="Equals(ZonedDateTime)"/> method) such that all operators other than <see cref="op_Inequality"/>
    /// will return false if asked to compare two values in different calendar systems and time zones.
    /// </para>
    /// <para>
    /// However, the <see cref="CompareTo"/> method (implementing <see cref="IComparable{T}"/>) is calendar and zone insensitive; it compares the two
    /// global instants in terms of when they actually occurred.
    /// </para>
    /// <para>
    /// It's unclear at the time of this writing whether this is the most appropriate approach, and it may change in future versions. In general,
    /// it would be a good idea for users to avoid comparing dates in different calendar systems, and indeed most users are unlikely to ever explicitly
    /// consider which calendar system they're working in anyway.
    /// </para>
    /// <para>
    /// Currently there is no real text handling support for this type.
    /// </para>
    /// </remarks>
    public struct ZonedDateTime : IEquatable<ZonedDateTime>, IComparable<ZonedDateTime>
    {
        private static readonly int TypeInitializationChecking = NodaTime.Utility.TypeInitializationChecker.RecordInitializationStart();

        private readonly LocalDateTime localDateTime;
        private readonly DateTimeZone zone;
        private readonly Offset offset;

        /// <summary>
        /// Internal constructor used by other code that has already validated and 
        /// computed the appropriate field values. No further validation is performed.
        /// </summary>
        internal ZonedDateTime(LocalDateTime localDateTime, Offset offset, DateTimeZone zone)
        {
            this.localDateTime = localDateTime;
            this.offset = offset;
            this.zone = zone;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="ZonedDateTime"/> struct.
        /// </summary>
        /// <param name="calendar">The calendar system.</param>
        /// <param name="instant">The instant.</param>
        /// <param name="zone">The time zone.</param>
        /// <exception cref="ArgumentNullException">Thrown if the <paramref name="calendar"/> or <paramref name="zone"/> is <c>null</c>.</exception>
        public ZonedDateTime(Instant instant, DateTimeZone zone, CalendarSystem calendar)
        {
            if (zone == null)
{'fraction_non_alphanumeric': 0.10192203573362209, 'fraction_numerical': 0.005414185165132647, 'mean_word_length': 2.8484375, 'pattern_counts': {'":': 0, '<': 81, '<?xml version=': 0, '>': 81, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '640973', 'n_tokens_mistral': 1838, 'n_tokens_neox': 1788, 'n_words': 792}