pub struct LoraDate {
pub year: i32,
pub month: u32,
pub day: u32,
}Fields§
§year: i32§month: u32§day: u32Implementations§
Source§impl LoraDate
impl LoraDate
pub fn new(year: i32, month: u32, day: u32) -> Result<Self, String>
pub fn parse(s: &str) -> Result<Self, String>
pub fn today() -> Self
pub fn to_epoch_days(&self) -> i64
pub fn from_epoch_days(days: i64) -> Self
pub fn day_of_week(&self) -> u32
pub fn day_of_year(&self) -> u32
pub fn add_duration(&self, dur: &LoraDuration) -> Self
pub fn sub_duration(&self, dur: &LoraDuration) -> Self
pub fn truncate_to_month(&self) -> Self
Trait Implementations§
Source§impl Ord for LoraDate
impl Ord for LoraDate
Source§impl PartialOrd for LoraDate
impl PartialOrd for LoraDate
impl Eq for LoraDate
impl StructuralPartialEq for LoraDate
Auto Trait Implementations§
impl Freeze for LoraDate
impl RefUnwindSafe for LoraDate
impl Send for LoraDate
impl Sync for LoraDate
impl Unpin for LoraDate
impl UnsafeUnpin for LoraDate
impl UnwindSafe for LoraDate
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