---
name: "dmi_get_date"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/dmi_get_date"
---

# dmi\_get\_date(9)

parse a DMI date

## NAME

dmi\_get\_date - parse a DMI date

## SYNOPSIS

**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

## DESCRIPTION

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.

## COPYRIGHT
