Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display countdown in only seconds format #103

Closed
Araknos opened this issue Jul 14, 2021 · 3 comments · Fixed by #104
Closed

Display countdown in only seconds format #103

Araknos opened this issue Jul 14, 2021 · 3 comments · Fixed by #104
Labels

Comments

@Araknos
Copy link

Araknos commented Jul 14, 2021

Hello,

Is there a way to format the countdown in a only seconds format ?
Instead of 2:00 (mm:ss) => 120 (?)

@cipchk
Copy link
Owner

cipchk commented Jul 14, 2021

@Araknos Yes, you can via formatDate , like this: #49 (comment)

@cipchk cipchk closed this as completed Jul 14, 2021
@cipchk cipchk reopened this Jul 14, 2021
@Araknos
Copy link
Author

Araknos commented Jul 14, 2021

@cipchk thank you, do you have any demo of formatDate ?

@cipchk
Copy link
Owner

cipchk commented Jul 14, 2021

Like this:

  config: CountdownConfig = {
    leftTime: 60 * 3,
    formatDate: ({ date }) => `${date / 1000}`,
  };

cipchk added a commit that referenced this issue Jul 14, 2021
@cipchk cipchk mentioned this issue Jul 14, 2021
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants