Example #1
0
        static void Main(string[] args)
        {
            MyDate md = new MyDate(1996, 15, 28);

            Console.WriteLine(md.Year);
            Console.WriteLine(md.isLeapYear(md.Year));
            md.SetMonth(14);
            Console.WriteLine("Elo elo rok{0} , elo elo miesiÄ…c{1}", md.Year, md.Month);
            Console.WriteLine(md.Day);
            Console.WriteLine(md.Month);
            Console.WriteLine(md);

            DateTime  date = DateTime.Now;
            DayOfWeek day  = DateTime.Now.DayOfWeek;

            if ((day == DayOfWeek.Saturday) || (day == DayOfWeek.Sunday))
            {
                Console.WriteLine("This is a weekend");
            }
            else
            {
                Console.WriteLine("Poczekaj do weekend");
            }

            var date1 = new DateTime(2008, 5, 31);

            Console.WriteLine(date1.ToString("F"));
            Console.WriteLine(date1);
            Console.WriteLine(day);
        }
Example #2
0
 public void PreviousDay(MyDate mi)
 {
     mi.Day--;
 }
Example #3
0
 public void NextDay(MyDate m)
 {
     m.Day++;
 }