We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
How is it possible to make a live clock?
The text was updated successfully, but these errors were encountered:
We have a helper useClock() hook here: https://github.com/nxtedition/create-caspar-graphics/blob/master/packages/graphics-kit/src/use-clock.js. We haven't documented this one yet, but it can be used similar to the other hooks as described here: https://gfx.nxtedition.com/docs/hooks/use-image.
useClock()
Sorry, something went wrong.
Tryed this, but does not seem to work? Ur.zip
It's close, but the options passed to it should be as described here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat.
This is probably what you want:
const GsapUr = () => { const ur = useClock("da-DK", { hour: 'numeric', minute: 'numeric' }) return ( <GsapTimeline hide={!ur} onPlay={timeline => { timeline.from('#ur', { opacity: 0 }) }} onStop={timeline => { timeline.to('#ur', { opacity: 0 }) }} > <div id="ur"> {ur} </div> </GsapTimeline> ) }
No branches or pull requests
How is it possible to make a live clock?
The text was updated successfully, but these errors were encountered: