iamkun/dayjs — reverse-engineered prompt

Reverse engineered prompt

GitHub

Build me a tiny JavaScript date and time library that feels familiar to people who have used Moment.js, but is much smaller and simpler. I want users to be able to parse dates, check if they’re valid, format them nicely, add or subtract time, compare dates, and chain those actions together in a clean way.

Please make the date objects immutable, so changing a date always returns a new one instead of silently changing the original. Keep the core library very small, with extra features available through optional plugins. Add support for different languages and locales, but only load them when someone asks for them.

Include clear examples like formatting today’s date, adding a year, setting the month, checking if one date is before another, and switching to Spanish or Chinese formatting. Make it work in browsers and normal JavaScript projects, and include tests and basic documentation so someone can install it and start using it quickly.

Want more depth? Deep Reverse