1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title><GDate>: </title>
- <meta name="generator" content="DocBook XSL Stylesheets V1.79.2">
- <link rel="home" href="index.html" title="">
- <link rel="up" href="ch01.html" title="GLib">
- <link rel="prev" href="re08.html" title="<%GLibConvertError>">
- <link rel="next" href="re10.html" title="<%GLibDateDMY>">
- <meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
- <link rel="stylesheet" href="style.css" type="text/css">
- </head>
- <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
- <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
- <td width="100%" align="left" class="shortcuts"></td>
- <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
- <td><img src="up-insensitive.png" width="16" height="16" border="0"></td>
- <td><a accesskey="p" href="re08.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
- <td><a accesskey="n" href="re10.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
- </tr></table>
- <div class="refentry">
- <a name="id-1.1.10"></a><div class="titlepage"></div>
- <div class="refnamediv">
- <h2><GDate></h2>
- <p><GDate></p>
- </div>
- <div class="refsect1">
- <a name="id-1.1.10.2"></a><h2>Description</h2>
- <p>Represents a day between January 1, Year 1 and a few thousand years in
- the future. None of its members should be accessed directly.
- </p>
- <p>If the <span class="type">GDate</span>-struct is obtained from <code class="function">g_date_new()</code>, it will be safe
- to mutate but invalid and thus not safe for calendrical computations.
- </p>
- <p>If it's declared on the stack, it will contain garbage so must be
- initialized with <code class="function">g_date_clear()</code>. <code class="function">g_date_clear()</code> makes the date invalid
- but safe. An invalid date doesn't represent a day, it's "empty." A date
- becomes valid after you set it to a Julian day or you set a day, month,
- and year.</p>
- </div>
- <div class="refsect1">
- <a name="id-1.1.10.3"></a><h2>Functions</h2>
- <div class="refsect2">
- <a name="id-1.1.10.3.2"></a><h3>add-days</h3>
- <div class="informalexample"><pre class="programlisting">(define-values () (date:add-days self n-days))
- </pre></div>
- <p>Increments a date some number of days.
- To move forward by weeks, add weeks*7 days.
- The date must be valid.</p>
- <div class="refsect3">
- <a name="id-1.1.10.3.2.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>date</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GDate</span> to increment</p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>n_days</p></td>
- <td class="parameter_description">
- <p>number of days to move the date forward</p>
- <p>Passed as <code class="code">n-days</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.10.3.3"></a><h3>add-months</h3>
- <div class="informalexample"><pre class="programlisting">(define-values () (date:add-months self n-months))
- </pre></div>
- <p>Increments a date by some number of months.
- If the day of the month is greater than 28,
- this routine may change the day of the month
- (because the destination month may not have
- the current day in it). The date must be valid.</p>
- <div class="refsect3">
- <a name="id-1.1.10.3.3.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>date</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GDate</span> to increment</p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>n_months</p></td>
- <td class="parameter_description">
- <p>number of months to move forward</p>
- <p>Passed as <code class="code">n-months</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.10.3.4"></a><h3>add-years</h3>
- <div class="informalexample"><pre class="programlisting">(define-values () (date:add-years self n-years))
- </pre></div>
- <p>Increments a date by some number of years.
- If the date is February 29, and the destination
- year is not a leap year, the date will be changed
- to February 28. The date must be valid.</p>
- <div class="refsect3">
- <a name="id-1.1.10.3.4.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>date</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GDate</span> to increment</p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>n_years</p></td>
- <td class="parameter_description">
- <p>number of years to move forward</p>
- <p>Passed as <code class="code">n-years</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.10.3.5"></a><h3>clamp</h3>
- <div class="informalexample"><pre class="programlisting">(define-values () (date:clamp self min-date max-date))
- </pre></div>
- <p>If <em class="parameter"><code>date</code></em> is prior to <em class="parameter"><code>min_date</code></em>, sets <em class="parameter"><code>date</code></em> equal to <em class="parameter"><code>min_date</code></em>.
- If <em class="parameter"><code>date</code></em> falls after <em class="parameter"><code>max_date</code></em>, sets <em class="parameter"><code>date</code></em> equal to <em class="parameter"><code>max_date</code></em>.
- Otherwise, <em class="parameter"><code>date</code></em> is unchanged.
- Either of <em class="parameter"><code>min_date</code></em> and <em class="parameter"><code>max_date</code></em> may be <code class="constant">NULL</code>.
- All non-<code class="constant">NULL</code> dates must be valid.</p>
- <div class="refsect3">
- <a name="id-1.1.10.3.5.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>date</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GDate</span> to clamp</p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>min_date</p></td>
- <td class="parameter_description">
- <p>minimum accepted value for <em class="parameter"><code>date</code></em></p>
- <p>Passed as <code class="code">min-date</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>max_date</p></td>
- <td class="parameter_description">
- <p>maximum accepted value for <em class="parameter"><code>date</code></em></p>
- <p>Passed as <code class="code">max-date</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.10.3.6"></a><h3>clear</h3>
- <div class="informalexample"><pre class="programlisting">(define-values () (date:clear self n-dates))
- </pre></div>
- <p>Initializes one or more <span class="type">GDate</span> structs to a safe but invalid
- state. The cleared dates will not represent an existing date, but will
- not contain garbage. Useful to init a date declared on the stack.
- Validity can be tested with <code class="function">g_date_valid()</code>.</p>
- <div class="refsect3">
- <a name="id-1.1.10.3.6.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>date</p></td>
- <td class="parameter_description">
- <p>pointer to one or more dates to clear</p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>n_dates</p></td>
- <td class="parameter_description">
- <p>number of dates to clear</p>
- <p>Passed as <code class="code">n-dates</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.10.3.7"></a><h3>compare</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return) (date:compare self rhs))
- </pre></div>
- <p><code class="function">qsort()</code>-style comparison function for dates.
- Both dates must be valid.</p>
- <div class="refsect3">
- <a name="id-1.1.10.3.7.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>lhs</p></td>
- <td class="parameter_description">
- <p>first date to compare</p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>rhs</p></td>
- <td class="parameter_description">
- <p>second date to compare</p>
- <p>Passed as <code class="code">rhs</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.10.3.8"></a><h3>copy</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return) (date:copy self))
- </pre></div>
- <p>Copies a GDate to a newly-allocated GDate. If the input was invalid
- (as determined by <code class="function">g_date_valid()</code>), the invalid state will be copied
- as is into the new object.</p>
- <div class="refsect3">
- <a name="id-1.1.10.3.8.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table><tr>
- <td class="parameter_name"><p>date</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GDate</span> to copy</p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr></table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.10.3.9"></a><h3>days-between</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return) (date:days-between self date2))
- </pre></div>
- <p>Computes the number of days between two dates.
- If <em class="parameter"><code>date2</code></em> is prior to <em class="parameter"><code>date1</code></em>, the returned value is negative.
- Both dates must be valid.</p>
- <div class="refsect3">
- <a name="id-1.1.10.3.9.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>date1</p></td>
- <td class="parameter_description">
- <p>the first date</p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>date2</p></td>
- <td class="parameter_description">
- <p>the second date</p>
- <p>Passed as <code class="code">date2</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.10.3.10"></a><h3>free</h3>
- <div class="informalexample"><pre class="programlisting">(define-values () (date:free self))
- </pre></div>
- <p>Frees a <span class="type">GDate</span> returned from <code class="function">g_date_new()</code>.</p>
- <div class="refsect3">
- <a name="id-1.1.10.3.10.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table><tr>
- <td class="parameter_name"><p>date</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GDate</span> to free</p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr></table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.10.3.11"></a><h3>get-day</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return) (date:get-day self))
- </pre></div>
- <p>Returns the day of the month. The date must be valid.</p>
- <div class="refsect3">
- <a name="id-1.1.10.3.11.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table><tr>
- <td class="parameter_name"><p>date</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GDate</span> to extract the day of the month from</p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr></table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.10.3.12"></a><h3>get-day-of-year</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return) (date:get-day-of-year self))
- </pre></div>
- <p>Returns the day of the year, where Jan 1 is the first day of the
- year. The date must be valid.</p>
- <div class="refsect3">
- <a name="id-1.1.10.3.12.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table><tr>
- <td class="parameter_name"><p>date</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GDate</span> to extract day of year from</p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr></table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.10.3.13"></a><h3>get-iso8601-week-of-year</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return) (date:get-iso8601-week-of-year self))
- </pre></div>
- <p>Returns the week of the year, where weeks are interpreted according
- to ISO 8601.</p>
- <div class="refsect3">
- <a name="id-1.1.10.3.13.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table><tr>
- <td class="parameter_name"><p>date</p></td>
- <td class="parameter_description">
- <p>a valid <span class="type">GDate</span></p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr></table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.10.3.14"></a><h3>get-julian</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return) (date:get-julian self))
- </pre></div>
- <p>Returns the Julian day or "serial number" of the <span class="type">GDate</span>. The
- Julian day is simply the number of days since January 1, Year 1; i.e.,
- January 1, Year 1 is Julian day 1; January 2, Year 1 is Julian day 2,
- etc. The date must be valid.</p>
- <div class="refsect3">
- <a name="id-1.1.10.3.14.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table><tr>
- <td class="parameter_name"><p>date</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GDate</span> to extract the Julian day from</p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr></table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.10.3.15"></a><h3>get-monday-week-of-year</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return) (date:get-monday-week-of-year self))
- </pre></div>
- <p>Returns the week of the year, where weeks are understood to start on
- Monday. If the date is before the first Monday of the year, return 0.
- The date must be valid.</p>
- <div class="refsect3">
- <a name="id-1.1.10.3.15.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table><tr>
- <td class="parameter_name"><p>date</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GDate</span></p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr></table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.10.3.16"></a><h3>get-month</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return) (date:get-month self))
- </pre></div>
- <p>Returns the month of the year. The date must be valid.</p>
- <div class="refsect3">
- <a name="id-1.1.10.3.16.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table><tr>
- <td class="parameter_name"><p>date</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GDate</span> to get the month from</p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr></table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.10.3.17"></a><h3>get-sunday-week-of-year</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return) (date:get-sunday-week-of-year self))
- </pre></div>
- <p>Returns the week of the year during which this date falls, if
- weeks are understood to begin on Sunday. The date must be valid.
- Can return 0 if the day is before the first Sunday of the year.</p>
- <div class="refsect3">
- <a name="id-1.1.10.3.17.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table><tr>
- <td class="parameter_name"><p>date</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GDate</span></p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr></table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.10.3.18"></a><h3>get-weekday</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return) (date:get-weekday self))
- </pre></div>
- <p>Returns the day of the week for a <span class="type">GDate</span>. The date must be valid.</p>
- <div class="refsect3">
- <a name="id-1.1.10.3.18.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table><tr>
- <td class="parameter_name"><p>date</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GDate</span></p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr></table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.10.3.19"></a><h3>get-year</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return) (date:get-year self))
- </pre></div>
- <p>Returns the year of a <span class="type">GDate</span>. The date must be valid.</p>
- <div class="refsect3">
- <a name="id-1.1.10.3.19.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table><tr>
- <td class="parameter_name"><p>date</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GDate</span></p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr></table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.10.3.20"></a><h3>is-first-of-month?</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return) (date:is-first-of-month? self))
- </pre></div>
- <p>Returns <code class="constant">TRUE</code> if the date is on the first of a month.
- The date must be valid.</p>
- <div class="refsect3">
- <a name="id-1.1.10.3.20.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table><tr>
- <td class="parameter_name"><p>date</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GDate</span> to check</p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr></table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.10.3.21"></a><h3>is-last-of-month?</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return) (date:is-last-of-month? self))
- </pre></div>
- <p>Returns <code class="constant">TRUE</code> if the date is the last day of the month.
- The date must be valid.</p>
- <div class="refsect3">
- <a name="id-1.1.10.3.21.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table><tr>
- <td class="parameter_name"><p>date</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GDate</span> to check</p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr></table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.10.3.22"></a><h3>order</h3>
- <div class="informalexample"><pre class="programlisting">(define-values () (date:order self date2))
- </pre></div>
- <p>Checks if <em class="parameter"><code>date1</code></em> is less than or equal to <em class="parameter"><code>date2</code></em>,
- and swap the values if this is not the case.</p>
- <div class="refsect3">
- <a name="id-1.1.10.3.22.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>date1</p></td>
- <td class="parameter_description">
- <p>the first date</p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>date2</p></td>
- <td class="parameter_description">
- <p>the second date</p>
- <p>Passed as <code class="code">date2</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.10.3.23"></a><h3>set-day</h3>
- <div class="informalexample"><pre class="programlisting">(define-values () (date:set-day self day))
- </pre></div>
- <p>Sets the day of the month for a <span class="type">GDate</span>. If the resulting
- day-month-year triplet is invalid, the date will be invalid.</p>
- <div class="refsect3">
- <a name="id-1.1.10.3.23.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>date</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GDate</span></p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>day</p></td>
- <td class="parameter_description">
- <p>day to set</p>
- <p>Passed as <code class="code">day</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.10.3.24"></a><h3>set-dmy</h3>
- <div class="informalexample"><pre class="programlisting">(define-values () (date:set-dmy self day month y))
- </pre></div>
- <p>Sets the value of a <span class="type">GDate</span> from a day, month, and year.
- The day-month-year triplet must be valid; if you aren't
- sure it is, call <code class="function">g_date_valid_dmy()</code> to check before you
- set it.</p>
- <div class="refsect3">
- <a name="id-1.1.10.3.24.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>date</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GDate</span></p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>day</p></td>
- <td class="parameter_description">
- <p>day</p>
- <p>Passed as <code class="code">day</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>month</p></td>
- <td class="parameter_description">
- <p>month</p>
- <p>Passed as <code class="code">month</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>y</p></td>
- <td class="parameter_description">
- <p>year</p>
- <p>Passed as <code class="code">y</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.10.3.25"></a><h3>set-julian</h3>
- <div class="informalexample"><pre class="programlisting">(define-values () (date:set-julian self julian-date))
- </pre></div>
- <p>Sets the value of a <span class="type">GDate</span> from a Julian day number.</p>
- <div class="refsect3">
- <a name="id-1.1.10.3.25.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>date</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GDate</span></p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>julian_date</p></td>
- <td class="parameter_description">
- <p>Julian day number (days since January 1, Year 1)</p>
- <p>Passed as <code class="code">julian-date</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.10.3.26"></a><h3>set-month</h3>
- <div class="informalexample"><pre class="programlisting">(define-values () (date:set-month self month))
- </pre></div>
- <p>Sets the month of the year for a <span class="type">GDate</span>. If the resulting
- day-month-year triplet is invalid, the date will be invalid.</p>
- <div class="refsect3">
- <a name="id-1.1.10.3.26.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>date</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GDate</span></p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>month</p></td>
- <td class="parameter_description">
- <p>month to set</p>
- <p>Passed as <code class="code">month</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.10.3.27"></a><h3>set-parse</h3>
- <div class="informalexample"><pre class="programlisting">(define-values () (date:set-parse self str))
- </pre></div>
- <p>Parses a user-inputted string <em class="parameter"><code>str</code></em>, and try to figure out what date it
- represents, taking the [current locale][setlocale] into account. If the
- string is successfully parsed, the date will be valid after the call.
- Otherwise, it will be invalid. You should check using <code class="function">g_date_valid()</code>
- to see whether the parsing succeeded.
- </p>
- <p>This function is not appropriate for file formats and the like; it
- isn't very precise, and its exact behavior varies with the locale.
- It's intended to be a heuristic routine that guesses what the user
- means by a given string (and it does work pretty well in that
- capacity).</p>
- <div class="refsect3">
- <a name="id-1.1.10.3.27.5"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>date</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GDate</span> to fill in</p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>str</p></td>
- <td class="parameter_description">
- <p>string to parse</p>
- <p>Passed as <code class="code">str</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.10.3.28"></a><h3>set-time</h3>
- <div class="informalexample"><pre class="programlisting">(define-values () (date:set-time self time-))
- </pre></div>
- <p>Sets the value of a date from a <span class="type">GTime</span> value.
- The time to date conversion is done using the user's current timezone.</p>
- <div class="refsect3">
- <a name="id-1.1.10.3.28.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>date</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GDate</span>.</p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>time_</p></td>
- <td class="parameter_description">
- <p><span class="type">GTime</span> value to set.</p>
- <p>Passed as <code class="code">time-</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.10.3.29"></a><h3>set-time-t</h3>
- <div class="informalexample"><pre class="programlisting">(define-values () (date:set-time-t self timet))
- </pre></div>
- <p>Sets the value of a date to the date corresponding to a time
- specified as a time_t. The time to date conversion is done using
- the user's current timezone.
- </p>
- <p>To set the value of a date to the current day, you could write:
- </p>
- <div class="informalexample"><pre class="programlisting">
- time_t now = time (NULL);
- if (now == (time_t) -1)
- // handle the error
- g_date_set_time_t (date, now);
- </pre></div>
- <div class="refsect3">
- <a name="id-1.1.10.3.29.5"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>date</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GDate</span></p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>timet</p></td>
- <td class="parameter_description">
- <p>time_t value to set</p>
- <p>Passed as <code class="code">timet</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.10.3.30"></a><h3>set-year</h3>
- <div class="informalexample"><pre class="programlisting">(define-values () (date:set-year self year))
- </pre></div>
- <p>Sets the year for a <span class="type">GDate</span>. If the resulting day-month-year
- triplet is invalid, the date will be invalid.</p>
- <div class="refsect3">
- <a name="id-1.1.10.3.30.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>date</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GDate</span></p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>year</p></td>
- <td class="parameter_description">
- <p>year to set</p>
- <p>Passed as <code class="code">year</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.10.3.31"></a><h3>subtract-days</h3>
- <div class="informalexample"><pre class="programlisting">(define-values () (date:subtract-days self n-days))
- </pre></div>
- <p>Moves a date some number of days into the past.
- To move by weeks, just move by weeks*7 days.
- The date must be valid.</p>
- <div class="refsect3">
- <a name="id-1.1.10.3.31.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>date</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GDate</span> to decrement</p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>n_days</p></td>
- <td class="parameter_description">
- <p>number of days to move</p>
- <p>Passed as <code class="code">n-days</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.10.3.32"></a><h3>subtract-months</h3>
- <div class="informalexample"><pre class="programlisting">(define-values () (date:subtract-months self n-months))
- </pre></div>
- <p>Moves a date some number of months into the past.
- If the current day of the month doesn't exist in
- the destination month, the day of the month
- may change. The date must be valid.</p>
- <div class="refsect3">
- <a name="id-1.1.10.3.32.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>date</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GDate</span> to decrement</p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>n_months</p></td>
- <td class="parameter_description">
- <p>number of months to move</p>
- <p>Passed as <code class="code">n-months</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.10.3.33"></a><h3>subtract-years</h3>
- <div class="informalexample"><pre class="programlisting">(define-values () (date:subtract-years self n-years))
- </pre></div>
- <p>Moves a date some number of years into the past.
- If the current day doesn't exist in the destination
- year (i.e. it's February 29 and you move to a non-leap-year)
- then the day is changed to February 29. The date
- must be valid.</p>
- <div class="refsect3">
- <a name="id-1.1.10.3.33.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>date</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GDate</span> to decrement</p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>n_years</p></td>
- <td class="parameter_description">
- <p>number of years to move</p>
- <p>Passed as <code class="code">n-years</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.10.3.34"></a><h3>to-struct-tm</h3>
- <div class="informalexample"><pre class="programlisting">(define-values () (date:to-struct-tm self tm))
- </pre></div>
- <p>Fills in the date-related bits of a struct tm using the <em class="parameter"><code>date</code></em> value.
- Initializes the non-date parts with something safe but meaningless.</p>
- <div class="refsect3">
- <a name="id-1.1.10.3.34.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>date</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GDate</span> to set the struct tm from</p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>tm</p></td>
- <td class="parameter_description">
- <p>struct tm to fill</p>
- <p>Passed as <code class="code">tm</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.10.3.35"></a><h3>valid?</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return) (date:valid? self))
- </pre></div>
- <p>Returns <code class="constant">TRUE</code> if the <span class="type">GDate</span> represents an existing day. The date must not
- contain garbage; it should have been initialized with <code class="function">g_date_clear()</code>
- if it wasn't allocated by one of the <code class="function">g_date_new()</code> variants.</p>
- <div class="refsect3">
- <a name="id-1.1.10.3.35.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table><tr>
- <td class="parameter_name"><p>date</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GDate</span> to check</p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr></table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.10.3.36"></a><h3>date:new-julian</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return) (date:new-julian julian-day))
- </pre></div>
- <p>Undocumented</p>
- <div class="refsect3">
- <a name="id-1.1.10.3.36.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table><tr>
- <td class="parameter_name"><p>julian_day</p></td>
- <td class="parameter_description">
- <p></p>
- <p>Passed as <code class="code">julian-day</code></p>
- </td>
- </tr></table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.10.3.37"></a><h3>date:new-dmy</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return) (date:new-dmy day month year))
- </pre></div>
- <p>Undocumented</p>
- <div class="refsect3">
- <a name="id-1.1.10.3.37.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>day</p></td>
- <td class="parameter_description">
- <p></p>
- <p>Passed as <code class="code">day</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>month</p></td>
- <td class="parameter_description">
- <p></p>
- <p>Passed as <code class="code">month</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>year</p></td>
- <td class="parameter_description">
- <p></p>
- <p>Passed as <code class="code">year</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.10.3.38"></a><h3>date:new</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return) (date:new))
- </pre></div>
- <p>Undocumented</p>
- </div>
- <div class="refsect2">
- <a name="id-1.1.10.3.39"></a><h3>date:get-days-in-month</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return) (date:get-days-in-month month year))
- </pre></div>
- <p>Returns the number of days in a month, taking leap
- years into account.</p>
- <div class="refsect3">
- <a name="id-1.1.10.3.39.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>month</p></td>
- <td class="parameter_description">
- <p>month</p>
- <p>Passed as <code class="code">month</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>year</p></td>
- <td class="parameter_description">
- <p>year</p>
- <p>Passed as <code class="code">year</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.10.3.40"></a><h3>date:get-monday-weeks-in-year</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return) (date:get-monday-weeks-in-year year))
- </pre></div>
- <p>Returns the number of weeks in the year, where weeks
- are taken to start on Monday. Will be 52 or 53. The
- date must be valid. (Years always have 52 7-day periods,
- plus 1 or 2 extra days depending on whether it's a leap
- year. This function is basically telling you how many
- Mondays are in the year, i.e. there are 53 Mondays if
- one of the extra days happens to be a Monday.)</p>
- <div class="refsect3">
- <a name="id-1.1.10.3.40.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table><tr>
- <td class="parameter_name"><p>year</p></td>
- <td class="parameter_description">
- <p>a year</p>
- <p>Passed as <code class="code">year</code></p>
- </td>
- </tr></table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.10.3.41"></a><h3>date:get-sunday-weeks-in-year</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return) (date:get-sunday-weeks-in-year year))
- </pre></div>
- <p>Returns the number of weeks in the year, where weeks
- are taken to start on Sunday. Will be 52 or 53. The
- date must be valid. (Years always have 52 7-day periods,
- plus 1 or 2 extra days depending on whether it's a leap
- year. This function is basically telling you how many
- Sundays are in the year, i.e. there are 53 Sundays if
- one of the extra days happens to be a Sunday.)</p>
- <div class="refsect3">
- <a name="id-1.1.10.3.41.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table><tr>
- <td class="parameter_name"><p>year</p></td>
- <td class="parameter_description">
- <p>year to count weeks in</p>
- <p>Passed as <code class="code">year</code></p>
- </td>
- </tr></table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.10.3.42"></a><h3>date:is-leap-year?</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return) (date:is-leap-year? year))
- </pre></div>
- <p>Returns <code class="constant">TRUE</code> if the year is a leap year.
- </p>
- <p>For the purposes of this function, leap year is every year
- divisible by 4 unless that year is divisible by 100. If it
- is divisible by 100 it would be a leap year only if that year
- is also divisible by 400.</p>
- <div class="refsect3">
- <a name="id-1.1.10.3.42.5"></a><h4>Parameters</h4>
- <div class="informaltable"><table><tr>
- <td class="parameter_name"><p>year</p></td>
- <td class="parameter_description">
- <p>year to check</p>
- <p>Passed as <code class="code">year</code></p>
- </td>
- </tr></table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.10.3.43"></a><h3>date:strftime</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return) (date:strftime s slen format date))
- </pre></div>
- <p>Generates a printed representation of the date, in a
- [locale][setlocale]-specific way.
- Works just like the platform's C library <code class="function">strftime()</code> function,
- but only accepts date-related formats; time-related formats
- give undefined results. Date must be valid. Unlike <code class="function">strftime()</code>
- (which uses the locale encoding), works on a UTF-8 format
- string and stores a UTF-8 result.
- </p>
- <p>This function does not provide any conversion specifiers in
- addition to those implemented by the platform's C library.
- For example, don't expect that using <code class="function">g_date_strftime()</code> would
- make the \%F provided by the C99 <code class="function">strftime()</code> work on Windows
- where the C library only complies to C89.</p>
- <div class="refsect3">
- <a name="id-1.1.10.3.43.5"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>s</p></td>
- <td class="parameter_description">
- <p>destination buffer</p>
- <p>Passed as <code class="code">s</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>slen</p></td>
- <td class="parameter_description">
- <p>buffer size</p>
- <p>Passed as <code class="code">slen</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>format</p></td>
- <td class="parameter_description">
- <p>format string</p>
- <p>Passed as <code class="code">format</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>date</p></td>
- <td class="parameter_description">
- <p>valid <span class="type">GDate</span></p>
- <p>Passed as <code class="code">date</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.10.3.44"></a><h3>date:valid-day?</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return) (date:valid-day? day))
- </pre></div>
- <p>Returns <code class="constant">TRUE</code> if the day of the month is valid (a day is valid if it's
- between 1 and 31 inclusive).</p>
- <div class="refsect3">
- <a name="id-1.1.10.3.44.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table><tr>
- <td class="parameter_name"><p>day</p></td>
- <td class="parameter_description">
- <p>day to check</p>
- <p>Passed as <code class="code">day</code></p>
- </td>
- </tr></table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.10.3.45"></a><h3>date:valid-dmy?</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return) (date:valid-dmy? day month year))
- </pre></div>
- <p>Returns <code class="constant">TRUE</code> if the day-month-year triplet forms a valid, existing day
- in the range of days <span class="type">GDate</span> understands (Year 1 or later, no more than
- a few thousand years in the future).</p>
- <div class="refsect3">
- <a name="id-1.1.10.3.45.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>day</p></td>
- <td class="parameter_description">
- <p>day</p>
- <p>Passed as <code class="code">day</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>month</p></td>
- <td class="parameter_description">
- <p>month</p>
- <p>Passed as <code class="code">month</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>year</p></td>
- <td class="parameter_description">
- <p>year</p>
- <p>Passed as <code class="code">year</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.10.3.46"></a><h3>date:valid-julian?</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return) (date:valid-julian? julian-date))
- </pre></div>
- <p>Returns <code class="constant">TRUE</code> if the Julian day is valid. Anything greater than zero
- is basically a valid Julian, though there is a 32-bit limit.</p>
- <div class="refsect3">
- <a name="id-1.1.10.3.46.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table><tr>
- <td class="parameter_name"><p>julian_date</p></td>
- <td class="parameter_description">
- <p>Julian day to check</p>
- <p>Passed as <code class="code">julian-date</code></p>
- </td>
- </tr></table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.10.3.47"></a><h3>date:valid-month?</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return) (date:valid-month? month))
- </pre></div>
- <p>Returns <code class="constant">TRUE</code> if the month value is valid. The 12 <span class="type">GDateMonth</span>
- enumeration values are the only valid months.</p>
- <div class="refsect3">
- <a name="id-1.1.10.3.47.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table><tr>
- <td class="parameter_name"><p>month</p></td>
- <td class="parameter_description">
- <p>month</p>
- <p>Passed as <code class="code">month</code></p>
- </td>
- </tr></table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.10.3.48"></a><h3>date:valid-weekday?</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return) (date:valid-weekday? weekday))
- </pre></div>
- <p>Returns <code class="constant">TRUE</code> if the weekday is valid. The seven <span class="type">GDateWeekday</span> enumeration
- values are the only valid weekdays.</p>
- <div class="refsect3">
- <a name="id-1.1.10.3.48.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table><tr>
- <td class="parameter_name"><p>weekday</p></td>
- <td class="parameter_description">
- <p>weekday</p>
- <p>Passed as <code class="code">weekday</code></p>
- </td>
- </tr></table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.10.3.49"></a><h3>date:valid-year?</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return) (date:valid-year? year))
- </pre></div>
- <p>Returns <code class="constant">TRUE</code> if the year is valid. Any year greater than 0 is valid,
- though there is a 16-bit limit to what <span class="type">GDate</span> will understand.</p>
- <div class="refsect3">
- <a name="id-1.1.10.3.49.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table><tr>
- <td class="parameter_name"><p>year</p></td>
- <td class="parameter_description">
- <p>year</p>
- <p>Passed as <code class="code">year</code></p>
- </td>
- </tr></table></div>
- </div>
- </div>
- </div>
- </div>
- <div class="footer">
- <hr>Generated by GTK-Doc V1.33.1</div>
- </body>
- </html>
|