How do I pass date in RFC2822 format, to an URL in GET method:
e.g I want to pass 18th jan 2013 as min_date_created in the URL https://www.xyz.com/orders
18th jan 2013 in RFC format is ==> Fri, 18 Jan 2013 17:58:49 +0000
how can I pass it to URL?
TIA!
Instead of passing the date as a string, you could convert it to the number of milliseconds since midnight Jan 1, 1970:
This way you won't have encoding problems.
Or you could also use
encodeURIComponent()
, see URL encode sees “&” (ampersand) as “&” HTML entity