pub struct SolarTermDateTime {
pub date: SolarDate,
pub hour: u8,
pub minute: u8,
pub second: u8,
}Expand description
The exact date and wall-clock time at which a solar term occurs.
This API returns the backend’s tyme-compatible calendar datetime and does not apply longitude or time-zone correction. The wall-clock value is China Standard Time (UTC+8), matching tyme4rs; no local-timezone or true-solar-time adjustment is applied.
§Examples
use lunar_lite::li_chun_datetime;
let dt = li_chun_datetime(2000).unwrap();
assert_eq!(dt.date.year, 2000);
assert_eq!(dt.date.month, 2);
assert_eq!(dt.date.day, 4);
assert_eq!(dt.hour, 20);
assert_eq!(dt.minute, 40);
assert_eq!(dt.second, 24);Fields§
§date: SolarDateGregorian date on which the solar term falls.
hour: u8Hour of the solar term (0–23).
minute: u8Minute of the solar term (0–59).
second: u8Second of the solar term (0–59).
Trait Implementations§
Source§impl Clone for SolarTermDateTime
impl Clone for SolarTermDateTime
Source§fn clone(&self) -> SolarTermDateTime
fn clone(&self) -> SolarTermDateTime
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SolarTermDateTime
Source§impl Debug for SolarTermDateTime
impl Debug for SolarTermDateTime
impl Eq for SolarTermDateTime
Source§impl Hash for SolarTermDateTime
impl Hash for SolarTermDateTime
Source§impl Ord for SolarTermDateTime
impl Ord for SolarTermDateTime
Source§fn cmp(&self, other: &SolarTermDateTime) -> Ordering
fn cmp(&self, other: &SolarTermDateTime) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for SolarTermDateTime
impl PartialEq for SolarTermDateTime
Source§fn eq(&self, other: &SolarTermDateTime) -> bool
fn eq(&self, other: &SolarTermDateTime) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for SolarTermDateTime
impl PartialOrd for SolarTermDateTime
impl StructuralPartialEq for SolarTermDateTime
Auto Trait Implementations§
impl Freeze for SolarTermDateTime
impl RefUnwindSafe for SolarTermDateTime
impl Send for SolarTermDateTime
impl Sync for SolarTermDateTime
impl Unpin for SolarTermDateTime
impl UnsafeUnpin for SolarTermDateTime
impl UnwindSafe for SolarTermDateTime
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