Skip to content

javierOrtega95/temporal-playground

Repository files navigation

⏱️ Temporal Playground

An interactive playground to learn and experiment with the Temporal API — the modern replacement for JavaScript's Date object.

MIT License GitHub

Why Temporal?

Unlike the legacy Date object, Temporal provides:

  • Timezone-aware calculations without surprises
  • Immutable date/time objects that prevent bugs
  • Clear, explicit APIs for common use cases
  • First-class support for calendars and non-Gregorian systems

What's this playground?

An interactive learning environment with:

  • 🎨 16 curated examples — from fundamentals to advanced concepts
  • Live code execution — edit code, see results instantly
  • 📝 Side-by-side comparisons — understand differences with Date
  • 💡 Full TypeScript support — autocomplete and type checking
  • 🛠️ Monaco Editor — the same editor as VS Code

No setup required — runs entirely in your browser.

What you'll learn

Fundamentals • Understanding Temporal types • Timezone conversion • Parsing & validation • Migration from Date

Common Operations • ISO durations • Date differences • Comparison & sorting • API serialization • Formatting

Advanced Concepts • Calendar vs absolute arithmetic • DST handling • Immutability benefits

Real-World Use Cases • Recurring events • Age calculation • Dashboard time windows

Contributing

Contributions welcome! Ideas for improvements:

  • 🐛 Report bugs or edge cases
  • 💡 Suggest new examples
  • 🎨 Improve UI/UX
  • 📝 Fix typos or enhance docs
  1. Fork the repo
  2. Create a branch (git checkout -b feature/amazing-example)
  3. Commit changes (git commit -m 'feat: add amazing example')
  4. Push (git push origin feature/amazing-example)
  5. Open a Pull Request

Built with ❤️ to help developers adopt Temporal

Give it a star ⭐Report an issueRequest a feature

About

Interactive playground for the JavaScript Temporal API

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages