Simple Day Timer
How do I make an simple day timer?
What is a simple day timer? How do you make a simple day timer? This script and codes were developed by Sicontis on 12 July 2022, Tuesday.
Simple Day Timer - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Simple Day Timer</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <html>
<head> <meta charset="UTF-8" /> <title>Vue JS Template</title>
</head>
<body> <div class="container" id="app"> <header> <h1>{{ title }}</h1> </header> <section> <div class="info"> <h3>Start date: <strong>{{ startDate }}</strong></h3> <h3>End date: <strong>{{ endDate }}</strong></h3> </div> <div class="clock"> <div class="box"> <h3>Number of days</h3> <h1>{{ days }}</h1> </div> <div class="box"> <h3>Days elapsed</h3> <h1>{{ elapsed }}</h1> </div> <div class="box"> <h3>Days remaining</h3> <h1>{{ remaining }}</h1> </div> </div> </section> </div>
</body>
</html> <script src='https://cdnjs.cloudflare.com/ajax/libs/vue/2.0.1/vue.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Simple Day Timer - Script Codes CSS Codes
body { font-family: Helvetica, Arial, sans-serif; display: flex; flex-direction: column; align-items: center; text-transform: uppercase; line-height: 2em; color: #383A3F;
}
header, section { margin: 30px 0;
}
h1 { font-size: 2em; color: #1F2124;
}
strong { color: #F6B352; font-weight: 600;
}
.container { width: 80%; padding: 50px;
}
.info { display: flex;
}
.info h3 { margin-right: 30px;
}
.clock { margin: 40px 0; display: flex;
}
.clock .box:last-child { border-right: 5px solid #1F2124;
}
.box { border: 5px solid #1F2124; border-right: none; padding: 20px; text-align: center;
}
.box h1 { color: #F68657;
}
Simple Day Timer - Script Codes JS Codes
new Vue({ // ELEMENT el: '#app', // DATA data: { title: 'Challenge Countdown Timer', days: 100, elapsed: '', remaining: '', startDate: '', endDate: '' }, // METHODS methods: { // Calculates difference between days daysBetween(start, end) { var oneDay = 1000 * 60 * 60 * 24; var startMS = start.getTime(); var endMS = end.getTime(); var differenceMS = Math.abs(startMS - endMS); return Math.round(differenceMS/oneDay); }, // Gets the dates needed to calculate whats placed in the output countdown() { var day = 1000 * 60 * 60 * 24; var numOfDays = 100; var dateStarted = new Date(2017, 0, 3); var todaysDate = new Date(); var daysElapsed = this.daysBetween(dateStarted, todaysDate); var daysLeft = numOfDays - daysElapsed; var dateEnds = daysLeft * day; var lastDate = Date.now() + dateEnds; var endDate = new Date(lastDate); var remainingDays = this.daysBetween(todaysDate, endDate); this.elapsed = daysElapsed; this.remaining = remainingDays; this.startDate = dateStarted.toDateString(); this.endDate = endDate.toDateString(); } }, created() { this.countdown(); }
});
Developer | Sicontis |
Username | Sicontis |
Uploaded | July 12, 2022 |
Rating | 3 |
Size | 2,549 Kb |
Views | 78,936 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Pomodoro Timer | 3,327 Kb |
Weight Converter | 3,114 Kb |
VueJS Logo SVG | 1,301 Kb |
Wikipedia Search | 3,279 Kb |
Striped Sliding Navigation | 4,272 Kb |
That Reddit Guy | 2,140 Kb |
Simple Calendar | 2,790 Kb |
Portfolio | 2,529 Kb |
A Pen by Sicontis | 1,586 Kb |
Simple Modal | 2,898 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
CSS Chat Bubbles | Boylett | 2,094 Kb |
Perforated foil | 0x04 | 2,617 Kb |
BabyStore | Pablo-Ai | 3,807 Kb |
Using Flickr API | MoyArt | 6,761 Kb |
Pomodoro Clock | Osycon | 3,705 Kb |
Multi-step GSAP animation | Acacheung | 2,668 Kb |
About Us | Francescaedits | 1,902 Kb |
CSS3 Fullscreen Background Slideshow | Leetech | 3,435 Kb |
Multiple jCarousel | Pafnuty | 2,461 Kb |
DevCamp 2014 - Denver Public Library | See8ch | 5,033 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!