IHYPRESS PROGRAMMING
Tutorials and JavaScript programs with code and output for beginners
c programming
HOME | ASP | C | CSS | GNUPLOT | HTML | JAVASCRIPT | PERL | PHP | PYTHON | RUBY | SVG
arrow_circle_left
share
arrow_circle_right
JavaScript ❯ Time and Date
<09>
<!DOCTYPE html> <html> <head> <script> let currentTime = new Date(); let month = String(currentTime.getMonth() + 1).padStart(2, '0'); let day = String (currentTime.getDate()).padStart(2, '0'); let year = currentTime.getFullYear(); let h = String(currentTime.getHours()).padStart(2, '0'); let m = String(currentTime.getMinutes()).padStart(2, '0'); let s = String(currentTime.getSeconds()).padStart(2, '0'); </script> </head> <body> <div style="font-size:1.6em; color: Blue;" id="d"> <script> document.write(month + "/" + day + "/" + year); </script> </div> <div style="font-size:1.6em; color: SeaGreen;" id="dt"> <script> document.write(month + "/" + day + "/" + year + " - " + h + ":" + m + ":" + s); </script> </div>
Hergestellt in Deutschland / Made in Germany
COPYRIGHT © 2015-2025 IHY PRESS Frankfurt am Main 60329 Deutschland