Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

http_headers_date function #22

Open
asg017 opened this issue Oct 27, 2021 · 0 comments
Open

http_headers_date function #22

asg017 opened this issue Oct 27, 2021 · 0 comments

Comments

@asg017
Copy link
Owner

asg017 commented Oct 27, 2021

to parse common headers date formated as Tue, 26 Oct 2021 05:15:58 GMT

sqlite datetime can't parse this on it's own, so it's annoying. this func would format it for use with other sqlite datetime utils

date, last modified, etc

https://httpwg.org/specs/rfc7231.html#http.date

Option #1

select 
  http_headers_date(response_headers), 
  http_headers_date(response_headers, 'last-modified') 
from ...;

Option #2

select 
  http_headers_date(
    http_headers_get(response_headers, 'Date')
  ),
  http_headers_date(
    http_headers_get(response_headers, 'Last-Modified')
  )
from ...;
@asg017 asg017 added this to the v0 milestone Nov 17, 2021
@asg017 asg017 removed this from the v0 milestone Aug 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant