GithubHelp home page GithubHelp logo

yasaswini999 / clock Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nisoojadhav/clock

0.0 0.0 0.0 14.17 MB

Digital Clock made using JavaScript and jQuery

Home Page: https://nisoojadhav.github.io/clock

JavaScript 35.50% CSS 42.52% HTML 21.97%

clock's Introduction

Digital Clock

This is Digital Clock image The Digital Clock

About Project

Digital Clock made using simple JavaScript and setting background images randomly using jQuery.

You can pin ๐Ÿ“Œ this site in your browser, that will serve as Aesthetic Clock + Wallpaper + Daily Quotes(coming soon!) Site.

pin

Skills

  • HTML
  • CSS
  • JavaScript

What did I use in this project this project?

  1. Math.floor(),
  2. Math.random(),
  3. JS Date object,
  4. getHours(), getMinutes(), getSeconds(),
  5. string.prototype.padStar().

Features

  • code ๐Ÿ‘‡

    const randomRng = Math.floor(Math.random() * 1000) + 0;

    document.body.style.cssText = background-image: url(https://picsum.photos/seed/${randomRng}/1920/1080);

    function clock() { const d = new Date();

    let h = d.getHours().toString().padStart(2, '0');

    let m = d.getMinutes().toString().padStart(2, '0');

    let s = d.getSeconds().toString().padStart(2, '0'); let session='PM'; if(h>=12){ h = (h-12).toString().padStart(2, '0'); session='PM'; } else{ session='AM'; } document.querySelector('time').innerHTML = h + ':' + m + ':' + s; document.querySelector('.ampm').innerHTML = session; } setInterval(clock, 1000);


- Show your love ๐Ÿ’› give us a star ๐ŸŒŸ

- You can contribute to this project.

Contributors

clock's People

Contributors

nisoojadhav avatar anuraglodhi avatar agrimaagrawal avatar bharat-chotwani avatar samarthasbhat avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.