Hacker News new | past | comments | ask | show | jobs | submit login

So this is a little project that I've been tinkering with over the last two or so years. It's just CSS and HTML only, but it allows the calendar to render the display for that month for any month for any year between 1800 and 2999 inclusive.

I've also recently added the calculation for Easter which not only displays at the bottom of the calendar display, but will also display over the respective date as a small Easter egg.

The last thing which I've added as of an hour ago, is the calculation of lunar phases... Bear in mind, this may be slightly out due to the code only basing it on a specific Julian date and not the exact Julian date and time, but it's as close as I can get with CSS...

This takes advantage of :has() which was crucial for the use of the <SELECT> tags; mod(), min() and max() for mathematical and Boolean calculations; and a neat little trick I've found to eliminate the calc() barrier found in most browsers.

NB: Please note, this may not necessarily work for all browsers... You may have better luck using Firefox or Chrome... Edge and Safari may work, but it has been somewhat selective due to some browsers not accommodating of all the new features.

If you want further information about this project, check: https://github.com/eliseo-dannunzio/css-calendar-with-easter...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: