You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 16, 2020. It is now read-only.
newDate()// This momentnewDate(value)// Milliseconds since January 1, 1970newDate(dateString)// ISO-8601 formatted date or datetimenewDate(year,month[,day[,hour[,minutes[,seconds[,milliseconds]]]]])
Right now, endpoints that take date as part of the filter query support the 4th method. We should add support for the other 3 as well.
I think we'd need a method to differentiate each call in our query parser.
For milliseconds since January 1, 1970, we could take an integer like date:1461461852.
For dateString, we could see if the string has commas or not? Although the special case is if for the 4th method, they only enter a year like date:"2016", then that has no commas in it. Maybe we check if the length of the string is 4 or something.
Opinions?
The text was updated successfully, but these errors were encountered:
Was originally considering doing this, but was running into a problem when splitting the query, since dateString contains colons (split with a limit seems to omit everything after the first occurrence, so .split(':', 1) doesn't work in this case).
We can use this (let me know if you have a better solution):
There are 4 ways to create dates in JS:
Right now, endpoints that take date as part of the filter query support the 4th method. We should add support for the other 3 as well.
I think we'd need a method to differentiate each call in our query parser.
date:1461461852
.date:"2016"
, then that has no commas in it. Maybe we check if the length of the string is 4 or something.Opinions?
The text was updated successfully, but these errors were encountered: