uDesign
UzMedia, Phpda
  1. <?php
  2. $now_hours = date('G');
  3. if($now_hours<8)
  4. {
  5. echo 'Tun';
  6. }
  7. elseif($now_hours<12 && $now_hours>=8 )
  8. {
  9. echo 'Tong';
  10. }
  11. elseif($now_hours>=12 && $now_hours<17)
  12. {
  13. echo 'Kun';
  14. }
  15. elseif($now_hours>=17 && $now_hours<=23)
  16. {
  17. echo 'Oqshom';
  18. }
  19. ?>

JS da
  1. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  2. <script language="JavaScript">
  3. var h=(new Date()).getHours();
  4. if (h > 23 || h <7) document.write('Tun') ;
  5. if (h > 6 && h < 12) document.write('Tong');
  6. if (h > 11 && h < 19) document.write('Kun');
  7. if (h > 18 && h < 24) document. write('Oqshom');
  8. </script>