Trait pyo3::types::PyDateAccess [−][src]
pub trait PyDateAccess {
fn get_year(&self) -> i32;
fn get_month(&self) -> u8;
fn get_day(&self) -> u8;
}
Expand description
Trait for accessing the date components of a struct containing a date.
Required methods
Returns the year, as a positive int.
Implementations should conform to the upstream documentation: https://docs.python.org/3/c-api/datetime.html#c.PyDateTime_GET_YEAR
Returns the month, as an int from 1 through 12.
Implementations should conform to the upstream documentation: https://docs.python.org/3/c-api/datetime.html#c.PyDateTime_GET_MONTH
Returns the day, as an int from 1 through 31.
Implementations should conform to the upstream documentation: https://docs.python.org/3/c-api/datetime.html#c.PyDateTime_GET_DAY