pub struct Date {
pub year: i16,
pub month: u8,
pub day: f64,
pub hms: HoursMinSec,
}Fields§
§year: i16§month: u8§day: f64§hms: HoursMinSecImplementations§
Source§impl Date
impl Date
pub fn new(year: i16, month: u8, day: f64) -> Self
Sourcepub fn from_full_date(
year: i16,
month: u8,
day: f64,
hours: u8,
minutes: u8,
seconds: f64,
) -> Self
pub fn from_full_date( year: i16, month: u8, day: f64, hours: u8, minutes: u8, seconds: f64, ) -> Self
Create a Date object from values: year, month, day, seconds, minutes, seconds.
pub fn to_julian_day(&self) -> JulianDay
Sourcepub fn week_day(&self) -> u8
pub fn week_day(&self) -> u8
Returns the day of the week of a calendar date (1 is Monday, 7 is Sunday)
pub fn is_leap(&self) -> bool
pub fn year_day(&self) -> u16
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Date
impl RefUnwindSafe for Date
impl Send for Date
impl Sync for Date
impl Unpin for Date
impl UnsafeUnpin for Date
impl UnwindSafe for Date
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