angular-apimock icon indicating copy to clipboard operation
angular-apimock copied to clipboard

Decide on a date format for URL query params

Open seriema opened this issue 10 years ago • 2 comments

While working on #44 I added a test case for dates, and the expected file name becomes so long. 1996-01-27 becomes the ISO string 1996-02-27t00:00:00.000z. E.g. a potential file name would be /mock_data/pokemon/releasedate=1996-02-27t00:00:00.000z.get.json.

Question 1: How short is ok? YYYY-MM-DD or YY-MM-DD? With or without time of day? How short timestamp? HH-MM-SS is enough? Question 2: Should it be easy to override somehow? I'm thinking about scenarios in search API's or similar where the dates can change and would require multiple .json files to match. Maybe the date doesn't have a real impact on the UI design, like just outputting the date. But I can also think of scenarios where it does matter, like changing texts or colors depending on the date value.

seriema avatar Oct 18 '15 13:10 seriema

Question 1: I think YYYY-MM-DD and that HH-MM-SS is enough.

MartinSandstrom avatar Oct 24 '15 12:10 MartinSandstrom

How would you imagine the final path? /mock_data/pokemon/releasedate=1996-02-27_00.00.00.get.json?

I just realised that the : in the timestamp that's currently created by v0.3.1 isn't a valid filename. Logged as #57

seriema avatar Oct 24 '15 14:10 seriema