How to sort meta objects by date in coding?

I’m trying to sort a meta object by date.

{% assign sorted_shows = shop.metaobjects.shows.values | sort: ‘show.date’ | reverse %}

{% for shows in sorted_shows %}
{{ shows.date }}

{% endfor %}

These are the results I get:

2024-02-09
2025-01-10
2024-02-01
2024-01-26
2024-02-16

any ideas? I’m stumped

From what I have learned Shopify has a glitch when it comes to sorting by Date. This fixes the issue.

{% assign sorted_shows = shop.metaobjects.shows.values | sort_natural: ‘date’ %}

{% for shows in sorted_shows %}

{{ shows.date }}

{% endfor %}

You’re a legend. Thanks for sharing this solution. It worked for me.