NaiveDateTime
struct NaiveDateTime
ISO 8601 combined date and time without timezone.
Fields
Implementions
Static Methods
new
pub fn new(date: NaiveDate, time: NaiveTime): NaiveDateTime
Create a new NaiveDateTime
object.
new
pub fn new(date: NaiveDate, time: NaiveTime): NaiveDateTime
Create a new NaiveDateTime
object.
Create a new NaiveDateTime
object.
Methods
replace_day
pub fn replace_day(self, year: int) throws InvalidDateTimeError
Replace the day of the month.
replace_day
pub fn replace_day(self, year: int) throws InvalidDateTimeError
Replace the day of the month.
Replace the day of the month.
replace_hour
pub fn replace_hour(self, hour: int) throws InvalidDateTimeError
Replace the clock hour.
replace_hour
pub fn replace_hour(self, hour: int) throws InvalidDateTimeError
Replace the clock hour.
Replace the clock hour.
replace_minute
pub fn replace_minute(self, minute: int) throws InvalidDateTimeError
Replace the clock minute.
replace_minute
pub fn replace_minute(self, minute: int) throws InvalidDateTimeError
Replace the clock minute.
Replace the clock minute.
replace_month
pub fn replace_month(self, month: int) throws InvalidDateTimeError
Replace the month of the year.
replace_month
pub fn replace_month(self, month: int) throws InvalidDateTimeError
Replace the month of the year.
Replace the month of the year.
replace_nanosecond
pub fn replace_nanosecond(self, nanosecond: int) throws InvalidDateTimeError
Replace the clock nanosecond.
replace_nanosecond
pub fn replace_nanosecond(self, nanosecond: int) throws InvalidDateTimeError
Replace the clock nanosecond.
Replace the clock nanosecond.
replace_second
pub fn replace_second(self, second: int) throws InvalidDateTimeError
Replace the clock second.
replace_second
pub fn replace_second(self, second: int) throws InvalidDateTimeError
Replace the clock second.
Replace the clock second.
replace_year
pub fn replace_year(self, year: int) throws InvalidDateTimeError
Replace the year.
replace_year
pub fn replace_year(self, year: int) throws InvalidDateTimeError
Replace the year.
Replace the year.
The month and day will be unchanged.