Incomprehensible error with babel and isodate

The error in question is:

! Undefined control sequence.
\ifthenelse #1#2#3->\let \bbl@temp@pref
\pageref \let \pageref \org@pageref
...
l.19 \date{\today}


Code:

\documentclass{memoir}
\usepackage[english]{babel}
\usepackage[english]{isodate}
\begin{document}
\isodate
\date{\today}
\end{document}


Intention:

I would like for \thedate to not print e.g. September 10. 2018 but rather 2018-09-10.

This is because memoir has a different definition of \date than the standard classes. It performs \protected@xdef on the argument to \date in order to define \thedate so that footnotes or \thanks commands disappear from it and this is the problem: isodate redefines \today in such a way that it doesn't survive \protected@xdef.
\date{\protect\today}

• So what does the error actually mean? I am getting the same error in beamer, using pgfplots and explicitely calling visualizaion depends on={value \ifthenelse{\thisrow{v}<90}{white}{black} \as \tcolor} which throws the above error and I have no idea how to debug this. Is there some straight-forward solution or do I have to post a separate question? – Bjarne Thorsted Dec 11 '18 at 9:27