diff --git a/X10D/Int32Extensions.cs b/X10D/Int32Extensions.cs index 56cadb5..446b82e 100644 --- a/X10D/Int32Extensions.cs +++ b/X10D/Int32Extensions.cs @@ -11,6 +11,142 @@ /// public static class Int32Extensions { + #region DateTime Returns + + /// + /// Returns a where the month is January. + /// + /// The day of the month. + /// The year. + /// The hour. + /// The minute. + /// The second. + public static DateTime January(this int day, int year, int hour = 0, int minute = 0, int second = 0) => + new DateTime(year, 1, day, hour, minute, second); + + /// + /// Returns a where the month is February. + /// + /// The day of the month. + /// The year. + /// The hour. + /// The minute. + /// The second. + public static DateTime February(this int day, int year, int hour = 0, int minute = 0, int second = 0) => + new DateTime(year, 2, day, hour, minute, second); + + /// + /// Returns a where the month is March. + /// + /// The day of the month. + /// The year. + /// The hour. + /// The minute. + /// The second. + public static DateTime March(this int day, int year, int hour = 0, int minute = 0, int second = 0) => + new DateTime(year, 3, day, hour, minute, second); + + /// + /// Returns a where the month is April. + /// + /// The day of the month. + /// The year. + /// The hour. + /// The minute. + /// The second. + public static DateTime April(this int day, int year, int hour = 0, int minute = 0, int second = 0) => + new DateTime(year, 4, day, hour, minute, second); + + /// + /// Returns a where the month is May. + /// + /// The day of the month. + /// The year. + /// The hour. + /// The minute. + /// The second. + public static DateTime May(this int day, int year, int hour = 0, int minute = 0, int second = 0) => + new DateTime(year, 5, day, hour, minute, second); + + /// + /// Returns a where the month is June. + /// + /// The day of the month. + /// The year. + /// The hour. + /// The minute. + /// The second. + public static DateTime June(this int day, int year, int hour = 0, int minute = 0, int second = 0) => + new DateTime(year, 6, day, hour, minute, second); + + /// + /// Returns a where the month is July. + /// + /// The day of the month. + /// The year. + /// The hour. + /// The minute. + /// The second. + public static DateTime July(this int day, int year, int hour = 0, int minute = 0, int second = 0) => + new DateTime(year, 7, day, hour, minute, second); + + /// + /// Returns a where the month is August. + /// + /// The day of the month. + /// The year. + /// The hour. + /// The minute. + /// The second. + public static DateTime August(this int day, int year, int hour = 0, int minute = 0, int second = 0) => + new DateTime(year, 8, day, hour, minute, second); + + /// + /// Returns a where the month is September. + /// + /// The day of the month. + /// The year. + /// The hour. + /// The minute. + /// The second. + public static DateTime September(this int day, int year, int hour = 0, int minute = 0, int second = 0) => + new DateTime(year, 9, day, hour, minute, second); + + /// + /// Returns a where the month is October. + /// + /// The day of the month. + /// The year. + /// The hour. + /// The minute. + /// The second. + public static DateTime October(this int day, int year, int hour = 0, int minute = 0, int second = 0) => + new DateTime(year, 10, day, hour, minute, second); + + /// + /// Returns a where the month is November. + /// + /// The day of the month. + /// The year. + /// The hour. + /// The minute. + /// The second. + public static DateTime November(this int day, int year, int hour = 0, int minute = 0, int second = 0) => + new DateTime(year, 11, day, hour, minute, second); + + /// + /// Returns a where the month is December. + /// + /// The day of the month. + /// The year. + /// The hour. + /// The minute. + /// The second. + public static DateTime December(this int day, int year, int hour = 0, int minute = 0, int second = 0) => + new DateTime(year, 12, day, hour, minute, second); + + #endregion + #region TimeSpan Returns // TODO change