1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>dmi_get_date</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="The Linux Kernel API"><link rel="up" href="firmware.html#idp1127298468" title="DMI Interfaces"><link rel="prev" href="API-dmi-find-device.html" title="dmi_find_device"><link rel="next" href="API-dmi-walk.html" title="dmi_walk"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="phrase">dmi_get_date</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-dmi-find-device.html">Prev</a> </td><th width="60%" align="center">DMI Interfaces</th><td width="20%" align="right"> <a accesskey="n" href="API-dmi-walk.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-dmi-get-date"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>dmi_get_date — 2 parse a DMI date 3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">bool <b class="fsfunc">dmi_get_date </b>(</code></td><td>int <var class="pdparam">field</var>, </td></tr><tr><td> </td><td>int * <var class="pdparam">yearp</var>, </td></tr><tr><td> </td><td>int * <var class="pdparam">monthp</var>, </td></tr><tr><td> </td><td>int * <var class="pdparam">dayp</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idp1127346148"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>field</code></em></span></dt><dd><p> 4 data index (see enum dmi_field) 5 </p></dd><dt><span class="term"><em class="parameter"><code>yearp</code></em></span></dt><dd><p> 6 optional out parameter for the year 7 </p></dd><dt><span class="term"><em class="parameter"><code>monthp</code></em></span></dt><dd><p> 8 optional out parameter for the month 9 </p></dd><dt><span class="term"><em class="parameter"><code>dayp</code></em></span></dt><dd><p> 10 optional out parameter for the day 11 </p></dd></dl></div></div><div class="refsect1"><a name="idp1127350892"></a><h2>Description</h2><p> 12 The date field is assumed to be in the form resembling 13 [mm[/dd]]/yy[yy] and the result is stored in the out 14 parameters any or all of which can be omitted. 15 </p><p> 16 17 If the field doesn't exist, all out parameters are set to zero 18 and false is returned. Otherwise, true is returned with any 19 invalid part of date set to zero. 20 </p><p> 21 22 On return, year, month and day are guaranteed to be in the 23 range of [0,9999], [0,12] and [0,31] respectively. 24</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-dmi-find-device.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="firmware.html#idp1127298468">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-dmi-walk.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">dmi_find_device</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span class="phrase">dmi_walk</span></td></tr></table></div></body></html> 25