RéférenceDateTimeDateTime():year()✦Use with AI▾Sur cette pageDateTime():year() Renvoie l'année de l'objet DateTime. Signature year(): number Renvoie Type : number L'année (par ex., 2024). Exemples local date = DateTime(2024, 1, 15)local year = date:year()toast("Year: " .. year) -- Output: 2024