ok, i'm looked into this once again and found no (simple) solution to change the code, so that the suggested implementation would work for timestamps, strings and datetime objects as well.