Struct exif::DateTime [] [src]

pub struct DateTime {
    pub year: u16,
    pub month: u8,
    pub day: u8,
    pub hour: u8,
    pub minute: u8,
    pub second: u8,
}

A struct used to parse a DateTime field.

Examples

use exif::DateTime;
let dt = DateTime::from_ascii(b"2016:05:04 03:02:01").unwrap();
assert_eq!(dt.year, 2016);
assert_eq!(format!("{}", dt), "2016-05-04 03:02:01");

Fields

Methods

impl DateTime
[src]

Parse an ASCII data of a DateTime field. The range of a number is not validated, so, for example, 13 may be returned as the month.

Trait Implementations

impl Debug for DateTime
[src]

Formats the value using the given formatter.

impl Display for DateTime
[src]

Formats the value using the given formatter. Read more