pub fn date_from_int(year: usize, month: usize, day: usize) -> Result<Value<'a>, TOMLError> {
    let y = format!("{:0>4}", year);
    let m = format!("{:0>2}", month);
    let d = format!("{:0>2}", day);
    match Date::from_str(y, m, d) {
      Ok(date) => {
        Ok(Value::DateTime(DateTime::new(date, None)))
      },
      Err(error) => Err(error),
    }
  }
/// Convenience function for creating a `Value::DateTime` containing only a date from integer values. Returns
/// `Ok(DateTime)` on success and `Err(TOMLError)` on failure.
///
/// # Examples
///
/// ```
/// use tomllib::types::{Value, DateTime, Date};
///
/// assert_eq!(Value::DateTime(DateTime::new(Date::from_str("2010", "04", "10").unwrap(), None)),
///   Value::date_from_int(2010, 4, 10).unwrap());
/// ```
Convenience function for creating a `Value::DateTime` containing only a date from integer values.
Convenience function for creating a ` Value :: DateTime ` containing only a date from integer values .
pub fn date_from_int(year: usize, month: usize, day: usize) -> Result<Value<'a>, TOMLError> {
    let y = format!("{:0>4}", year);
    let m = format!("{:0>2}", month);
    let d = format!("{:0>2}", day);
    match Date::from_str(y, m, d) {
      Ok(date) => {
        Ok(Value::DateTime(DateTime::new(date, None)))
      },
      Err(error) => Err(error),
    }
  }
pub fn date_from_int ( year : usize , month : usize , day : usize ) -> Result < Value < ' a > , TOMLError > { let y = format ! ( " " year ) ; let m = format ! ( " " month ) ; let d = format ! ( " " day ) ; match Date :: from_str ( y , m , d ) { Ok ( date ) => { Ok ( Value :: DateTime ( DateTime :: new ( date , None ) ) ) } , Err ( error ) => Err ( error ) , } }
Convenience function for creating a `Value::DateTime` containing only a date from integer values.
Convenience function for creating a ` Value :: DateTime ` containing only a date from integer values .
year
usize
month
usize
day
usize
year
usize
month
usize
day
usize
examples
```
use tomllib::types::{Value, DateTime, Date}.


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