JS Date Functions for manipulating time series data