#[repr(C)]pub struct Calendar { /* private fields */ }
Expand description
Represents the Calendar
class from C++.
Implementations§
Source§impl Calendar
impl Calendar
Sourcepub fn get_singleton() -> Option<&'static Calendar>
pub fn get_singleton() -> Option<&'static Calendar>
Gets the singleton instance of Calendar
.
Sourcepub fn get_current_game_time(&self) -> Option<Hour>
pub fn get_current_game_time(&self) -> Option<Hour>
Gets the current game time.
Sourcepub fn get_day_name(&self) -> Option<&'static str>
pub fn get_day_name(&self) -> Option<&'static str>
Gets the day name.
Sourcepub fn get_day_of_week(&self) -> Option<Week>
pub fn get_day_of_week(&self) -> Option<Week>
Gets the day of the week.
Sourcepub fn get_days_passed(&self) -> Option<GameDay>
pub fn get_days_passed(&self) -> Option<GameDay>
Gets the number of days passed.
Sourcepub fn get_time_date_string(dest: *mut c_char, max: u32, show_year: bool)
pub fn get_time_date_string(dest: *mut c_char, max: u32, show_year: bool)
Gets the time string.
Sourcepub fn get_hours_passed(&self) -> Option<f32>
pub fn get_hours_passed(&self) -> Option<f32>
Gets the number of hours passed.
Sourcepub fn get_hours_per_day() -> f32
pub fn get_hours_per_day() -> f32
Gets the number of hours per day.
Sourcepub fn get_minutes(&self) -> Option<u32>
pub fn get_minutes(&self) -> Option<u32>
Gets the current minutes.
Sourcepub fn get_month(&self) -> Option<MonthIndex>
pub fn get_month(&self) -> Option<MonthIndex>
Gets the current month.
Sourcepub fn get_month_name(&self) -> Option<&'static str>
pub fn get_month_name(&self) -> Option<&'static str>
Gets the month name.
Sourcepub fn get_ordinal_suffix(&self) -> Option<&'static str>
pub fn get_ordinal_suffix(&self) -> Option<&'static str>
Gets the ordinal suffix for the day.
Sourcepub fn get_time(&self) -> Option<GameDateTime>
pub fn get_time(&self) -> Option<GameDateTime>
Gets the in-game time as a NaiveDateTime
.
Sourcepub fn get_timescale(&self) -> f32
pub fn get_timescale(&self) -> f32
Gets the current time scale.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Calendar
impl RefUnwindSafe for Calendar
impl !Send for Calendar
impl !Sync for Calendar
impl Unpin for Calendar
impl UnwindSafe for Calendar
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more