simonw / museums

A website recommending niche museums to visit

Home Page:https://www.niche-museums.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Press article dates should be YYYY-MM-DD

simonw opened this issue · comments

Also sanity check existing dates - I think the jAdis one is incorrect for example.

Also update this code:

"nicer_date": lambda d: datetime.datetime.strptime(d, "%d-%M-%Y").strftime(
"%e %B %Y"
),

There was also a bug in the date display code - %e did not work how I thought - so I replaced it with this:

"nicer_date": lambda d: "{dt.day} {dt:%B} {dt.year}".format(
dt=datetime.datetime.strptime(d, "%Y-%M-%d")
),

That fixed it: https://www.niche-museums.com/browse/museums/49 shows the correct article date now:
jAdis