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
Currently the API returns a human readable string for the time a compose was created, something like "2022-10-01 08:31:13.23555 +0000 UTC".
Is there any issue with returning an ISO-8601 compliant string instead? The example given would in that case be: "2022-10-01T08:31:13.23555+00:00". This is slightly less human readable, but would be much easier to parse if working with the API programmatically.
For instance, I am currently implementing a feature in the front end that requires me to find the most recently created image. Javascript's Date() object is able to parse ISO-8601 compliant datetime strings and I would be able to simply write code like this:
const date1 = new Date('2022-10-01T08:31:13.23555+00:00"');
const date2 = new Date('2022-10-01T08:32:13.23555+00:00"');
if (date1 > date2) {
...
}
(Note that Javascript's Date() object is not able to parse what the API currently returns.)
The text was updated successfully, but these errors were encountered:
https://en.wikipedia.org/wiki/ISO_8601
Currently the API returns a human readable string for the time a compose was created, something like
"2022-10-01 08:31:13.23555 +0000 UTC"
.Is there any issue with returning an ISO-8601 compliant string instead? The example given would in that case be:
"2022-10-01T08:31:13.23555+00:00"
. This is slightly less human readable, but would be much easier to parse if working with the API programmatically.For instance, I am currently implementing a feature in the front end that requires me to find the most recently created image. Javascript's Date() object is able to parse ISO-8601 compliant datetime strings and I would be able to simply write code like this:
(Note that Javascript's Date() object is not able to parse what the API currently returns.)
The text was updated successfully, but these errors were encountered: