added time masks

Hi,

I added some functionality so that you can select the granularity of the relative time (for my own needs). Just sent this pull request in case you are interested :). Also there might be some edge cases where it doesn't work that well.

Keep up the good work :+1: