Dynamic Weekday

</ head>

</ body>

<!-- DYNAMIC WEEKDAY --> 
<script>
// for each .weekday element
document.querySelectorAll('.weekday').forEach(weekday => {
  // get today's day
  const today = new Intl.DateTimeFormat('en', {weekday:'long'}).format(new Date());
  // set it as the current text
  weekday.textContent = today;
});
</script>

HTML/Embed

Author
Traf
Published
Dec 2, 2020

How to use:

Tutorial Coming Soon!

Check Browser Support

Interactive Table

Comments

Unfortunately at this time we don't have SSO for comments so you will have to sign up separately to leave your comment. Thanks for understanding!

This snippet will generate the text dynamically for the correct weekday where ever you want in your project.

Clone Project
Documentation
Author:
Built by
Built with
For the best experience

Please switch to desktop to view the content.

Back Home
Thank you! Your submission has been received!
Close Form
Oops! Something went wrong while submitting the form.
Become a Contributor