Introduce timeline formatter function

see index.html for an example.