Edinburgh Council put their bin days out in a PDF - this is crappy for a number of reasons but mostly because I have to keep finding it and opening it. Sure, I could type it in to my calendar but what else could I do with it? ChatGPT took my input and created a nice little bit of code that displays the next bins to put out.

And, if you care, here are the prompts that got us here:

  I have a list of dates and which recycling bins to put out on those dates. I need some javascript to show me a message up to (and including) a given date, then switch over to the next date. Here are some dates and the bins that are to be put out. 
07/02/2023	Recycling & Glass
14/02/2023	Non-recyclable
21/02/2023	Recycling & Glass
28/02/2023	Non-recyclable
07/03/2023	Recycling & Glass
14/03/2023	Non-recyclable

The code was good but...

This is fantastic. Can you turn it in to something that will display in HTML please?

I was mostly happy with this.

I'd like the message to have a little more detail. Can the message interpret the date so that before the message it says: "Tuesday 7th of February: $MESSAGE"?

It failed at this... but in a way that was easy to understand

Can you rewrite the code above - it has two mistakes. The dates are all in UK date format (dd/mm/yyyy) and also when I put 7th the th should be ordinal number - here is some ordinal number code: