@ciao-lang/ts-ciao-interface
Version:
Simple Ciao interface for node.
41 lines • 7.89 kB
HTML
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><meta name="theme-color" content="#273f79"/><link rel="stylesheet" href="lpdoc.css" type="text/css"/><script type="text/javascript" src="lpdoc.js"></script><title>HTTP dates — The Ciao System v1.22</title></head><body><div class="lpdoc-page fixleftbar"><a href="#" id="sidebar-toggle-button" class="lpdoc-navbutton"><span id="sidebar-button-arrow">☰</span></a><div id="sidebar" class="lpdoc-sidebar"><div style="height: 40px; margin-left: auto; margin-right: auto"><img src="ciao-logo_autofig.png" width=auto height=100%></div><div class="lpdoc-nav"><span class="lpdoc-on-right"><a class="lpdoc-navbutton" href="http_doc.html">↑</a><a class="lpdoc-navbutton" href="http_messages.html">←</a><a class="lpdoc-navbutton" href="http_grammar.html">→</a><a class="lpdoc-navbutton" href="ciaosearch.html">🔍</a></span><span><a href="ciaofulltoc.html">TOC</a></span></div><hr></hr><ul class="lpdoc-itemize-sectpath"><li><a href="ciao.html">The Ciao System</a> »<br/> </li><li><a href="ExtraLibs.html">PART VIII - Additional libraries</a> »<br/> </li><li><a href="http_doc.html">HTTP client/server libraries</a> »<br/> </li><li><a href=""><strong>HTTP dates</strong></a></li></ul><hr></hr><em>ON THIS PAGE</em><ul><li><a href="#Usage and interface">Usage and interface</a></li><li><a href="#Documentation on exports">Documentation on exports</a></li><li><a href="#Documentation on imports">Documentation on imports</a></li></ul></div><div class="lpdoc-main"><div id=""><h1>HTTP dates</h1><a class="lpdoc-idx-anchor" href="ciaosearch.html#http_date"></a>
<strong>Author(s):</strong> <a class="lpdoc-idx-anchor" id="The Ciao Development Team" href="ciaosearch.html#The Ciao Development Team">The Ciao Development Team</a>.<p>
<p>Parser/printer for dates in the HTTP protocol.<p>The format of dates in HTTP/1.1 (RFC1123 and RFC850) (see <a href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3">RFC2616</a>) is the following:<p><pre class="lpdoc-codeblock">HTTP-date = rfc1123-date | rfc850-date | asctime-date
rfc1123-date = wkday "," SP date1 SP time SP "GMT"
rfc850-date = weekday "," SP date2 SP time SP "GMT"
asctime-date = wkday SP date3 SP time SP 4DIGIT
date1 = 2DIGIT SP month SP 4DIGIT
; day month year (e.g., 02 Jun 1982)
date2 = 2DIGIT "-" month "-" 2DIGIT
; day-month-year (e.g., 02-Jun-82)
date3 = month SP ( 2DIGIT | ( SP 1DIGIT ))
; month day (e.g., Jun 2)
time = 2DIGIT ":" 2DIGIT ":" 2DIGIT
; 00:00:00 - 23:59:59
wkday = "Mon" | "Tue" | "Wed"
| "Thu" | "Fri" | "Sat" | "Sun"
weekday = "Monday" | "Tuesday" | "Wednesday"
| "Thursday" | "Friday" | "Saturday" | "Sunday"
month = "Jan" | "Feb" | "Mar" | "Apr"
| "May" | "Jun" | "Jul" | "Aug"
| "Sep" | "Oct" | "Nov" | "Dec"</pre><br/><div id="Usage and interface"><h2>Usage and interface</h2><div class="lpdoc-cartouche"><ul><li><strong>Library usage:</strong><br/><tt>:- use_module(library(http/http_date)).</tt><li><strong>Exports:</strong><br/><ul class="lpdoc-itemize-minus"><li><em>Predicates:</em><br/><a class="lpdoc-idx-anchor" id="0" href="#http_date_str/3"><tt>http_date_str/3</tt></a>.
<li><em>Regular Types:</em><br/><a class="lpdoc-idx-anchor" id="1" href="#http_date/1"><tt>http_date/1</tt></a>, <a class="lpdoc-idx-anchor" id="2" href="#weekday/1"><tt>weekday/1</tt></a>, <a class="lpdoc-idx-anchor" id="3" href="#month/1"><tt>month/1</tt></a>, <a class="lpdoc-idx-anchor" id="4" href="#hms_time/1"><tt>hms_time/1</tt></a>.
</ul></ul></div></div><div id="Documentation on exports"><h2>Documentation on exports</h2><div><div class="lpdoc-defname"><span class="lpdoc-predtag">REGTYPE</span><a class="lpdoc-idx-anchor" id="http_date/1" href="ciaosearch.html#http_date/1">http_date/1</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>http_date(Date)</tt>
</span><p><span class="lpdoc-var">Date</span> is a term defined as <pre class="lpdoc-codeblock">http_date(date(WeekDay,Day,Month,Year,Time)) :-
weekday(WeekDay),
int(Day),
month(Month),
int(Year),
hms_time(Time).
</pre>.<p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>http_date(Date)</tt>
</span><p><span class="lpdoc-var">Date</span> is a term denoting a date.</p><ul class="lpdoc-itemize-minus"></ul></div></div><p>
<div><div class="lpdoc-defname"><span class="lpdoc-predtag">REGTYPE</span><a class="lpdoc-idx-anchor" id="weekday/1" href="ciaosearch.html#weekday/1">weekday/1</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>weekday(WeekDay)</tt>
</span><p><span class="lpdoc-var">WeekDay</span> is a term denoting a weekday.</p><ul class="lpdoc-itemize-minus"></ul></div></div><p>
<div><div class="lpdoc-defname"><span class="lpdoc-predtag">REGTYPE</span><a class="lpdoc-idx-anchor" id="month/1" href="ciaosearch.html#month/1">month/1</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>month(Month)</tt>
</span><p><span class="lpdoc-var">Month</span> is a term denoting a month.</p><ul class="lpdoc-itemize-minus"></ul></div></div><p>
<div><div class="lpdoc-defname"><span class="lpdoc-predtag">REGTYPE</span><a class="lpdoc-idx-anchor" id="hms_time/1" href="ciaosearch.html#hms_time/1">hms_time/1</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>hms_time(Time)</tt>
</span><p><span class="lpdoc-var">Time</span> is an atom of the form <tt>hh:mm:ss</tt></p><ul class="lpdoc-itemize-minus"></ul></div></div><p>
<div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="http_date_str/3" href="ciaosearch.html#http_date_str/3">http_date_str/3</a></div><div class="lpdoc-deftext">No further documentation available for this predicate.</div></div><p>
</div><div id="Documentation on imports"><h2>Documentation on imports</h2>This module has the following direct dependencies:<ul class="lpdoc-itemize-minus"><li><em>System library modules:</em><br/><a class="lpdoc-idx-anchor" id="5" href="http_grammar.html"><tt>http_grammar</tt></a>.
<li><em>Packages:</em><br/><a class="lpdoc-idx-anchor" id="6" href="ciaosearch.html#prelude"><tt>prelude</tt></a>, <a class="lpdoc-idx-anchor" id="7" href="ciaosearch.html#initial"><tt>initial</tt></a>, <a class="lpdoc-idx-anchor" id="8" href="condcomp_doc.html"><tt>condcomp</tt></a>, <a class="lpdoc-idx-anchor" id="9" href="assertions_doc.html"><tt>assertions</tt></a>, <a class="lpdoc-idx-anchor" id="10" href="ciaosearch.html#assertions/assertions_basic"><tt>assertions/assertions_basic</tt></a>, <a class="lpdoc-idx-anchor" id="11" href="isomodes_doc.html"><tt>isomodes</tt></a>, <a class="lpdoc-idx-anchor" id="12" href="regtypes_doc.html"><tt>regtypes</tt></a>, <a class="lpdoc-idx-anchor" id="13" href="dcg_doc.html"><tt>dcg</tt></a>, <a class="lpdoc-idx-anchor" id="14" href="ciaosearch.html#hiord"><tt>hiord</tt></a>, <a class="lpdoc-idx-anchor" id="15" href="doccomments_doc.html"><tt>doccomments</tt></a>.
</ul></div></div><div class="lpdoc-footer">Generated with LPdoc using Ciao</div></div><div class="lpdoc-clearer"></div></div></body></html>