Advertisement
buresm

datum_čas

Feb 27th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>iddk_4</title>
  6. </head>
  7.  
  8. <body>
  9. <h1>Datum a čas</h1>
  10.   <script language="JavaScript" type ="text/javascript">
  11.      
  12.       nazvy_dni=new Array("neděle", "pondělí", "úterý", "středa", "čtvrtek", "pátek", "sobota");
  13.      
  14.       nazvy_mesicu=new Array("leden", "únor", "březen","duben","květen","červen", "červenec","srpen","září","říjen","listopad","prosinec");
  15.      
  16.       dnes=new Date();
  17.      
  18.       with (dnes)
  19.           {
  20.               den=getDate();
  21.               rok=getFullYear();
  22.               hodina=getHours();
  23.               minuta=getMinutes();
  24.               sekunda=getSeconds();
  25.               nazev_dne=nazvy_dni[getDay()];
  26.               nazev_mesice=nazvy_mesicu[getMonth()];
  27.           }
  28.      
  29.       document.write("<B>Datum:<"+"/B> "+nazev_dne+", "+den);
  30.       document.write(". "+nazev_mesice+" "+rok+"<BR>");
  31.       document.write("<B>Čas:<"+"/B> "+hodina+" hodin, "+minuta);
  32.       document.write(" minut, "+sekunda+" sekund");
  33.     </script>
  34.     </body>
  35. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement