dmi_get_date(9)

dmi_get_date9

Parse a dmi date

Usage

bool dmi_get_date(int field, int * yearp, int * monthp, int * dayp);

Arguments

field

data index (see enum dmi_field)

yearp

optional out parameter for the year

monthp

optional out parameter for the month

dayp

optional out parameter for the day

Overview

The date field is assumed to be in the form resembling [mm[/dd]]/yy[yy] and the result is stored in the out parameters any or all of which can be omitted.

If the field doesn't exist, all out parameters are set to zero and false is returned. Otherwise, true is returned with any invalid part of date set to zero.

On return, year, month and day are guaranteed to be in the range of [0,9999], [0,12] and [0,31] respectively.

Releases

4 releases since Debian 6.0 (Squeeze); the text changed 3 times.

  1. 6.0
  2. 7
  3. 8
  4. 9

From linux-manual-4.9 4.9.228-1 in Debian 9 (Stretch). Parsed by carta from the page's man source.