Exemple #1
0
        static void Main(string[] args)
        {
            MyDate date1 = new MyDate(DateTime.Now);

            Console.WriteLine(date1.ToString());

            MyDate date2 = new MyDate(new DateTime(2017, 12, 4));

            Console.WriteLine(date2.ToString());

            Console.WriteLine(MyDate.Sub(date1, date2).ToString());
            Console.WriteLine(MyDate.Add(date1, date2).ToString());

            // Delay.
            Console.ReadKey();
        }
Exemple #2
0
 public static MyDate Add(MyDate d1, MyDate d2)
 {
     return(d1 + d2);
 }
Exemple #3
0
 public static MyDate Sub(MyDate d1, MyDate d2)
 {
     return(d1 - d2);
 }