Adding a function to parse trading dates and trading periods to a timestamp