I have a scenario where i can get date time in any of the following format.

1) as string in following format : 1970-01-01T00:00:00

2) "now-5m"

3) "now-1h"

or similar combinations with min, second or even day, I want to get a time which is x min older than this given time, What would be the best way to do so ? Is there any library present which can handle all these formats and give me datetime in some uniform format?