Hey there!
I'm using the HTTP agent to get the headers of a file, like curl -I https://example.com which works fine. The answer is successfully converted to JSON.
My idea was using a preprocessing step to extract the "Last-Modified" from JSON. Works fine.
Where I fail is using JS to convert the received string like
I used
, which works awesome with my dev environment in VS Code.
After heavy searching and testing I figured that with the given duktape implementation Date.now() is implemented but the Date.parse() is not fully implemented, because I can convert a time in the format of
I was wondering whether someone had an idea on how to solve this problem or some way around it.
Thank you!
Thomas
I'm using the HTTP agent to get the headers of a file, like curl -I https://example.com which works fine. The answer is successfully converted to JSON.
My idea was using a preprocessing step to extract the "Last-Modified" from JSON. Works fine.
Where I fail is using JS to convert the received string like
Code:
Thu, 26 Jan 2023 11:12:13 GMT
Code:
return Date.parse(value)
After heavy searching and testing I figured that with the given duktape implementation Date.now() is implemented but the Date.parse() is not fully implemented, because I can convert a time in the format of
Code:
YYYY-MM-DDTHH:mm:ss.sssZ
Thank you!
Thomas
\d{2})\
Comment