<commit_before>﻿namespace NSupport {
    using System;

    public static class TimeSpanDateTime {
        public static DateTime Ago(this TimeSpan source) {
            return source.Until(DateTime.Now);
        }

        public static DateTime FromNow(this TimeSpan source) {
            return source.Since(DateTime.Now);
        }

        public static DateTime Until(this TimeSpan source, DateTime time) {
            return time.Subtract(source);
        }

        public static DateTime Since(this TimeSpan source, DateTime time) {
            return time.Add(source);
        }
    }
}<commit_msg>added xml doc for TimeSpan DateTime conversion<commit_after>﻿namespace NSupport {
    using System;

    public static class TimeSpanDateTime {
        /// <summary>
        /// Returns a <see cref="DateTime"/> which subtract current <see cref="TimeSpan"/> ago from now.
        /// </summary>
        /// <param name="source">A <see cref="TimeSpan"/> instance.</param>
        /// <returns>Returns a <see cref="DateTime"/> which subtract current <see cref="TimeSpan"/> ago from now.</returns>
        public static DateTime Ago(this TimeSpan source) {
            return source.Until(DateTime.Now);
        }

        /// <summary>
        /// Returns a <see cref="DateTime"/> which add current <see cref="TimeSpan"/> since from now.
        /// </summary>
        /// <param name="source">A <see cref="TimeSpan"/> instance.</param>
        /// <returns>Returns a <see cref="DateTime"/> which add current <see cref="TimeSpan"/> since from now.</returns>
        public static DateTime FromNow(this TimeSpan source) {
            return source.Since(DateTime.Now);
        }

        /// <summary>
        /// Returns a <see cref="DateTime"/> which subtract current <see cref="TimeSpan"/> ago from the <paramref name="time"/>.
        /// </summary>
        /// <param name="source">A <see cref="TimeSpan"/> instance.</param>
        /// <param name="time">A <see cref="DateTime"/> ago from.</param>
        /// <returns>Returns a <see cref="DateTime"/> which subtract current <see cref="TimeSpan"/> ago from the <paramref name="time"/>.</returns>
        public static DateTime Until(this TimeSpan source, DateTime time) {
            return time.Subtract(source);
        }

        /// <summary>
        /// Returns a <see cref="DateTime"/> which add current <see cref="TimeSpan"/> since from the <paramref name="time"/>.
        /// </summary>
        /// <param name="source">A <see cref="TimeSpan"/> instance.</param>
        /// <param name="time">A <see cref="DateTime"/> since from.</param>
        /// <returns>Returns a <see cref="DateTime"/> which add current <see cref="TimeSpan"/> since from the <paramref name="time"/>.</returns>
        public static DateTime Since(this TimeSpan source, DateTime time) {
            return time.Add(source);
        }
    }
}
{'fraction_non_alphanumeric': 0.14360041623309053, 'fraction_numerical': 0.0, 'mean_word_length': 2.4049586776859506, 'pattern_counts': {'":': 0, '<': 57, '<?xml version=': 0, '>': 57, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 1}, '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': '896987', 'n_tokens_mistral': 732, 'n_tokens_neox': 718, 'n_words': 238}