2,275 questions
0
votes
2
answers
87
views
countback from date is negative, how to make numbers positive? [closed]
i am trying to use a countback from a certain date, and want it to read something like (100d, 10hrs, 10sec). the countback does this fine, except it reads as (-100d, -10hrs, -10sec). is there a way to ...
1
vote
1
answer
108
views
How to change colors of countdown timers in a Quarto Revealjs presentation?
How do you change colors for other timers subsequent to the first timer using the countdown package in Quarto revealjs presentations? The user manual for the countdown package indicates that it's ...
2
votes
3
answers
58
views
How to use useState, Dispatch input?
Consider this code:
const [seconds, setSeconds] = useState<number>(START_VALUE);
useEffect(() => {
const intervalId = setInterval(() => {
setSeconds((previousSeconds) => ...
0
votes
2
answers
184
views
How do I make a countdown timer using JavaScript in CodeHS?
I'm trying to make a game using a website called CodeHS, and it needs a time limit. I'm trying to achieve this through graphic text on a canvas that counts down from 2 minutes, but it isn't working. I'...
0
votes
1
answer
132
views
How to prevent a Countdown timer to be jumpy/ pushing the number next to it using (HTML, CSS, JS only) [closed]
I am working on a project where countdown is the main focus. But when the count down starts as the numbers count down certain numbers push and pull other numbers like when eg. 22:00 changes it pulls ...
1
vote
0
answers
32
views
Time fluctuating
// Determine next month and year
$nextMonthDate = new DateTime('first day of next month');
$nextMonthName = $nextMonthDate->format('F');
$nextYear = $nextMonthDate->format('Y');
// ...
$...
2
votes
2
answers
279
views
How is this animated PNG image aware of the current time and date?
I received an email from a company which has a countdown like this in it:
(This is not the "live" one, it's a copy - as a GIF, not PNG - of how it looked at one point, since the countdown ...
0
votes
1
answer
79
views
How to set a weekday as the starter and ender of a countdown instead of using an specific/static date in javascript
So, I have this personal project that I'm trying to do more for studying purposes. It would be two timers to monitor two different events in a week, in which one would countdown the remain time of a ...
0
votes
1
answer
309
views
Implement countdown timer in Glance widget
I need to implement a countdown timer in a Glance widget, that should be updated every second. At the bare minimum, every minute.
What would be the best approach for this using Jetpack Compose Glance ...
0
votes
1
answer
67
views
Python typing game - Countdown timer that exits program after given time
I am trying to build a rough typing game for a school project. I tried using the threading method(which I only know a tiny bit of) to make the timer run simultaneously with input. The idea is to stop ...
1
vote
2
answers
307
views
How do i edit the codepen FlipDown.js Countdown?
I found this countdown clock in CodePen, but I need to edit it, I need to set the final date to May 30, 2024. ¿Does anybody know how to set up the final date?
document.addEventListener('...
1
vote
1
answer
84
views
how to update a label in countdown with customtkinter
I was creating a sound recorder and when i wanted to create a countdown i face problems
here's my code
from customtkinter import *
import sounddevice
from scipy.io.wavfile import write
import time
...
0
votes
1
answer
62
views
Countdown to varying payday in Javascript
This is the first time I've written a code in Javascript, and I'm no better in other coding languages, but I managed to get the code to work (kinda).
I think this code could be way shorter but theres ...
-1
votes
1
answer
724
views
Angular 17 does not update view using setInterval with NG0500 error in console
I am building a countdown timer component and trying to display updated 'seconds' value within every second, but I do not see any update on UI
When I do not use outside zone attitude, then page is ...
0
votes
0
answers
93
views
setTimeout only called once time in useEffect with Jest unit test
I have countdown function in useEffect and i want to write unit-test for it:
[countDown,setCountDown] = useEffect(60)
useEffect(() => {
if (countDown !== 0) {
countdownTimeout = ...
0
votes
1
answer
42
views
I did a cutdown with js, but it has a 3 second delay to start
Within the project there is a startCount() function that starts the countdown, the countdown is done, but it is taking 3 seconds to start.
Here is the function startCount():
function startCount(...
0
votes
1
answer
42
views
Changing the date on a countdown when distance is < 0
I have a timer to countdown to a date and time.
What I'd like it to do is that after it hits 0 with the first date, it would then start counting down to the next date.
I am not at all good at code so ...
-1
votes
1
answer
521
views
How do I make a JavaScript countdown using a Unix timestamp?
I am making a website that needs a countdown until a specific time, but I can't find anything that lets me input a Unix timestamp and gives the same countdown for all users, regardless of timezones.
I ...
1
vote
0
answers
40
views
Different times from php to javascript for countdown between 5 times -from time to time
I want to export 5 different times from a php script for prayertimes calculation,
and import them into Javascript to make a countdown timer between the times.
coutdown -> between fajr and dhur time
...
1
vote
1
answer
3k
views
Countdown timer in Angular17
I'm trying to make a countdown timer in my home component. It kind of looks like this.
Here is the place I put countdown in html file:
<div>
{{displayTime}}
</div>
My Home.ts file:
...
-2
votes
1
answer
109
views
Countdown Timer in js, what's wrong?
I'm in the middle of a countdown app project (Pomodoro)
The app doesn't work for me, something in the calculation of the Math library may not be written correctly even though I think it is written ...
0
votes
1
answer
121
views
Progress bar with localstorage (js)
I'm using countdown with progress bar like this https://codepen.io/Rudchyk/pen/qNOEGj but I can't figure out how do I save the progress when I reload the page?
<div id="progressBar">
...
0
votes
1
answer
385
views
How to use CountDownLatch in creating threads so that they add messages into the list the order I call?
I am trying to use CountDownLatch, so that the fourth and fifth threads starts running only after the start of first three threads and these threads add messages into the result list while they are ...
-3
votes
1
answer
106
views
Make a timer for competitions with buttons [closed]
I need help. I need to make a countdown timer, with two buttons (start and stop).
However, this timer needs to change, at one point it needs to be a 1 minute timer, at another time it needs to be a 2 ...
0
votes
1
answer
198
views
Creating a 20 second timer doesn't work and I'm trying to understand why
I've been trying to implement the following code into my website:
let count = 20;
const timer = setInterval(function() {
count--;
console.log(count);
if (count === 0) {
clearInterval(timer);
...
2
votes
2
answers
1k
views
Countdown timer Java JavaFX
Can someone please help me make a countdown timer in JavaFX? I need the time to be taken from a label (the time is set by a slider) and I want to see the minutes and seconds remaining every second. ...
0
votes
1
answer
181
views
Weird bug in React custom useCountDown hook under strict mode
I wrote a custom React useCountDown hook to count down a number (seconds) until zero. The counting is triggered by start() method attached in a button onClick listener.
It works well without <React....
1
vote
2
answers
179
views
How can I make a prolog predicate that recursively counts down to 0. (swi-pl)
Given a number Num the predicate should count down from Num to 0, excluding Num. Trying to do this recursively, but only receiving one answer as output instead of the entire countdown.
Tried to ...
-1
votes
3
answers
143
views
Is there a way to put text on screen at the end of a countdown?
Is there a way to put some text on screen at the end of this countdown or a cake? this is a countdown for my B-Day and i really want it to show some text and/or a cake at the end for my b-day but I ...
-2
votes
1
answer
378
views
How to make a countdown timer using Time Remaining [closed]
I want to implement a countdown timer, based on the current time and end time.
For example:
Current time: 20:30:30
End time always is : 23:59:59
-> I will implement a countdown timer as: 03:29:29
0
votes
0
answers
60
views
How can I make multiple countdown timer with one countdown library?
I am trying to create multiple countdown by using one countdown library but when I loop through the elements, only the last countdown works. Other countdown stays still. The interval is only working ...
1
vote
0
answers
518
views
I get an error when I use react-native-countdown-component
I use the react-native-countdown-component package in my project. Everything is okay, but when I call a function on onFinish I get an error.
here is my code
<CountDown
until={exam....
0
votes
0
answers
161
views
Live countdown timer in react
So I am trying to make a countdown timer which will work even if I exit page or refresh tab. I made a timer its works correctly but stops working and it freezes at the time when I refresh tab. How can ...
0
votes
3
answers
70
views
Why isn't the number in my countdown timer changing?
So I'm trying to create a function that has a string with a number at the end of it that counts down sequentially. For example:
string = "This is a test."
number = [*range(0, 10)]
This is a ...
1
vote
1
answer
68
views
Time limit for input with countdown [duplicate]
I'm pretty new to Python and I want to set an input time limit with a countdown timer which I can watch count.
I have checked other similar questions, they are mainly explaining how to set a time ...
0
votes
0
answers
69
views
Countdown Timer and Animation Not In Sequence
I am messing around with a countdown timer and noticed that the numeric time and svg circle animation are not in sequence at the end of the countdown. And, it gets worse as you add more minutes!
I ...
-1
votes
1
answer
82
views
I want the number to disappear when the countdown reaches 1 "the 2 being the last number to show". The countdown needs to continue to count until -1
How can I get this countdown to hide the numbers after the countdown reaches 1. The 2 is the last number I want to show. The countdown needs to continue to count all the way to -1, just not show up on ...
0
votes
2
answers
244
views
How do I create a dynamic vacation countdown for my Excel calendar?
So I have this Excel calendar that I've made that I use at work to track various things, and now I would like to add a "vacation countdown", that would display the remaining days until the ...
1
vote
1
answer
269
views
Pause-resume function on countdown timer (Javascript)
Currently creating a 25 minutes countdown timer with timing incrementing/decrementing buttons. I managed to create the timer and get it to work when pressing "Start" button, but I'm ...
0
votes
2
answers
112
views
Javascript count down to UTC 4am every day & every Sunday
I am building a resource for an MMORPG (game) that has daily and weekly resets. One reset is every Sunday @ 4am UTC and another is every day @ 4am UTC. I am looking to display countdown timers at the ...
0
votes
1
answer
50
views
JS countdown to specific day and time in while loop
I'm trying to make a while loop in javascript, which will countdown to every Wednesday to 17:00 PM CEST. I need to get the output in unixtimestamp.
I tried to do this:
// seed date, (ANY past ...
1
vote
1
answer
62
views
Format seconds for countdown
I'm developing a feature that need to format seconds in this form in countdown (begin from 60s):
60.9, 60.8, 60.7,...,59.9, 59.8 etc.
I write this code and is working fine except for 60. When the ...
-1
votes
2
answers
824
views
How to create a timer in html which starts from same position each time when website is opened [closed]
I have written html code with a timer, but I need a script for it to countdown. I researched a lot in the internet and couldn't find anything that could help me. Maybe someone has experience with this ...
1
vote
0
answers
44
views
JavaScript countdown bug fix
Hello thanks for your help, i have made a js count down that was supposed to stop counting once the interval set is elapsed, the count down is working but once the target time reaches, instead it to ...
0
votes
1
answer
101
views
setInterval problems with a countdown timer using Draftbit
enter image description hereI have this set up to start a countdown timer...
const initialCountdown = 10; // Initial countdown value (change as needed)
let countdown = initialCountdown;
const ...
0
votes
2
answers
95
views
Show the stock counter in more than one place on the same page
This script works great as a stock countdown, but I couldn't show it in more than 1 place on the same page.
For example, on the same page there are 4 or 5 products/plans and each product shows a ...
1
vote
1
answer
63
views
Prevent countdown reset on page load
I have a stock counter that works fine, but I would like to prevent the countdown from resetting when the page reloads.
<span class="qty" id="qty"></span>
<script&...
0
votes
1
answer
699
views
Countdown function in flutterflow
How can you implement a countdown inside of flutterflow with the help of custom functions and the timer widget?
In the end we need to have hours, minutes and seconds visible. The countdown should end ...
-3
votes
2
answers
184
views
1 Week Countdown Timer in Java
EDIT:
I have created a countdown timer, however I cannot figure out how to update without creating a new instance. The code is below:
import java.util.concurrent.*;
import javax.swing.JFrame;
import ...
2
votes
1
answer
218
views
Sync JavaScript timer with browser performance [duplicate]
Let's say I'm running a laggy app in the background of my computer.
This lag also affects the browser's performance (in this case Firefox).
And now, I build a JavaScript timer with this code:
let ...