Пример #1
0
        private static void NormaliseSubtractedSecond(Iso8601Time isoTime)
        {
            Time time = new Time(isoTime.hour, isoTime.minute, isoTime.second);
            time.NormaliseSubtractedSecond();

            isoTime.hour = time.Hour;
            isoTime.minute = time.Minute;
            isoTime.second = time.Second;
        }
Пример #2
0
        private static void NormaliseSubtractedMinute(Iso8601Time isoTime)
        {
            Time time = new Time(isoTime.hour, isoTime.minute);
            time.NormaliseSubtractedMinutes();

            isoTime.hour = time.Hour;
            isoTime.minute = time.Minute;
        }
Пример #3
0
        private static void NormaliseFractionalSecond(Iso8601DateTime isoDateTime)
        {
            DesignByContract.Check.Require(!isoDateTime.MinuteUnknown, "isoDateTime.MinuteUnknow must be false.");
            DesignByContract.Check.Require(!isoDateTime.SecondUnknown, "isoDateTime.SecondUnknown must be false.");
            DesignByContract.Check.Require(isoDateTime.HasFractionalSecond, "isoDateTime.HasFractionalSecond must be true.");

            Time time = new Time(isoDateTime.hour, isoDateTime.minute, isoDateTime.second, isoDateTime.fractionalSecond);
            time.NormaliseFractionalSecond();

            isoDateTime.hour = time.Hour;
            isoDateTime.minute = time.Minute;
            isoDateTime.second = time.Second;
            isoDateTime.fractionalSecond = time.FractionalSeconds;

            NormaliseHour(isoDateTime);
        }
Пример #4
0
        private static void NormaliseSecond(Iso8601Time isoTime)
        {
            DesignByContract.Check.Require(!isoTime.MinuteUnknown, "isoTime.MinuteUnknow must be false.");
            DesignByContract.Check.Require(!isoTime.SecondUnknown, "isoTime.SecondUnknown must be false.");

            Time time = new Time(isoTime.hour, isoTime.minute, isoTime.second);
            time.NormaliseSecond();

            isoTime.hour = time.Hour;
            isoTime.minute = time.Minute;
            isoTime.second = time.Second;
        }
Пример #5
0
        private static void NormaliseSubtractedMinute(Iso8601DateTime isoDateTime)
        {
            DesignByContract.Check.Require(!isoDateTime.HourUnknown, "isoDateTime.HourUnknown must be false.");

            Time time = new Time(isoDateTime.hour, isoDateTime.minute);
            time.NormaliseSubtractedMinutes();

            isoDateTime.hour = time.Hour;
            isoDateTime.minute = time.Minute;

            NormaliseSubtractedHour(isoDateTime);
        }