Exemplo n.º 1
0
 public void Formattime(ThoiGian temptg)
 {
     if (temptg.giay >= 60)
     {
         temptg.giay = 0;
         temptg.phut++;
     }
     if (temptg.phut >= 60)
     {
         temptg.phut = 0;
         temptg.gio++;
     }
     if (temptg.gio >= 24)
     {
         temptg.gio = 0;
         temptg.ngay++;
     }
     int[] thangchan = { 4, 6, 9, 11 };
     int[] thangle   = { 1, 3, 5, 7, 8, 10, 12 };
     if ((Array.IndexOf(thangchan, temptg.thang) >= 0 && temptg.ngay > 30) || (Array.IndexOf(thangle, temptg.thang) >= 0 && temptg.ngay > 31) ||
         (temptg.thang == 2 && temptg.ngay > 28))
     {
         temptg.ngay = 0;
         temptg.thang++;
     }
     if (temptg.thang > 12)
     {
         temptg.thang = 1;
         temptg.nam++;
     }
 }
Exemplo n.º 2
0
 public ThoiGian(ThoiGian time)
 {
     Day   = time.day;
     Ngay  = time.ngay;
     Thang = time.thang;
     Nam   = time.nam;
     Gio   = time.gio;
     Phut  = time.phut;
     Giay  = time.giay;
 }
Exemplo n.º 3
0
 public void Distance(ThoiGian tempthoigian1, ThoiGian templatethoigian2)
 {
 }