rosetta/datetime
Types
Represents date and time data structure without timezone information. This format is lossy.
pub type DateTimeNaive {
DateTimeNaive(
year: Year,
month: Month,
day: Day,
hour: Hour,
minute: Minute,
second: Second,
)
}
Constructors
-
DateTimeNaive( year: Year, month: Month, day: Day, hour: Hour, minute: Minute, second: Second, )
Represents naive date (without timezone data.)
pub type NaiveDate {
NaiveDate(year: Year, month: Month, day: Day)
}
Constructors
-
NaiveDate(year: Year, month: Month, day: Day)
Functions
pub fn date() -> NaiveDate
Returns current date as NaiveDate. Naive Date is not corrected with timezone.
pub fn naivedate_to_tuple(d: NaiveDate) -> #(Int, Int, Int)
Utility function. Converts NaiveDate into tuple.