pub fn datetime_zulu_from_int(year: usize, month: usize, day: usize, hour: usize, minute: usize, second: usize) -> Result<Value<'a>, TOMLError> {
    let y = format!("{:0>4}", year);
    let m = format!("{:0>2}", month);
    let d = format!("{:0>2}", day);
    let h = format!("{:0>2}", hour);
    let min = format!("{:0>2}", minute);
    let s = format!("{:0>2}", second);
    match Date::from_str(y, m, d) {
      Ok(date) => {
        match Time::from_str(h, min, s, None, Some(TimeOffset::Zulu)) {
          Ok(time) => Ok(Value::DateTime(DateTime::new(date, Some(time)))),
          Err(error) => Err(error),
        }
      },
      Err(error) => Err(error),
    }
  }
/// Convenience function for creating a `Value::DateTime` containing a date and time with a timezone of Zulu from
/// integer values. Returns Ok(DateTime)` on success and `Err(TOMLError)` on failure.
///
/// # Examples
///
/// ```
/// use tomllib::types::{Value, DateTime, Date, Time, TimeOffset};
///
/// assert_eq!(Value::DateTime(DateTime::new(Date::from_str("2010", "04", "10").unwrap(),
///   Some(Time::from_str("01", "02", "03", None, Some(TimeOffset::Zulu)).unwrap()))),
///   Value::datetime_zulu_from_int(2010, 4, 10, 1, 2, 3).unwrap());
/// ```
Convenience function for creating a `Value::DateTime` containing a date and time with a timezone of Zulu from
integer values.
Convenience function for creating a ` Value :: DateTime ` containing a date and time with a timezone of Zulu from integer values .
pub fn datetime_zulu_from_int(year: usize, month: usize, day: usize, hour: usize, minute: usize, second: usize) -> Result<Value<'a>, TOMLError> {
    let y = format!("{:0>4}", year);
    let m = format!("{:0>2}", month);
    let d = format!("{:0>2}", day);
    let h = format!("{:0>2}", hour);
    let min = format!("{:0>2}", minute);
    let s = format!("{:0>2}", second);
    match Date::from_str(y, m, d) {
      Ok(date) => {
        match Time::from_str(h, min, s, None, Some(TimeOffset::Zulu)) {
          Ok(time) => Ok(Value::DateTime(DateTime::new(date, Some(time)))),
          Err(error) => Err(error),
        }
      },
      Err(error) => Err(error),
    }
  }
pub fn datetime_zulu_from_int ( year : usize , month : usize , day : usize , hour : usize , minute : usize , second : usize ) -> Result < Value < ' a > , TOMLError > { let y = format ! ( " " year ) ; let m = format ! ( " " month ) ; let d = format ! ( " " day ) ; let h = format ! ( " " hour ) ; let min = format ! ( " " minute ) ; let s = format ! ( " " second ) ; match Date :: from_str ( y , m , d ) { Ok ( date ) => { match Time :: from_str ( h , min , s , None , Some ( TimeOffset :: Zulu ) ) { Ok ( time ) => Ok ( Value :: DateTime ( DateTime :: new ( date , Some ( time ) ) ) ) , Err ( error ) => Err ( error ) , } } , Err ( error ) => Err ( error ) , } }
Convenience function for creating a `Value::DateTime` containing a date and time with a timezone of Zulu from
integer values.
Convenience function for creating a ` Value :: DateTime ` containing a date and time with a timezone of Zulu from integer values .
year
usize
month
usize
day
usize
hour
usize
minute
usize
second
usize
year
usize
month
usize
day
usize
hour
usize
minute
usize
second
usize
examples
```
use tomllib::types::{Value, DateTime, Date, Time, TimeOffset}.


` ` ` use tomllib :: types :: { Value DateTime Date Time TimeOffset } .