|
Oktatás * Programozás 1 * Szkriptnyelvek Teaching * Programming 1 (BI) Félévek Linkek * kalendárium |
Nim2 /
Add time to a dateSee also std/times import std/times let today = "20260503" dt: DateTime = parse(today, "yyyyMMdd") tomorrow = dt + 1.days yesterday = dt - 1.days echo tomorrow # 2026-05-04T00:00:00+02:00 echo tomorrow.format("yyyyMMdd") # 20260504 echo yesterday # 2026-05-02T00:00:00+02:00 echo yesterday.format("yyyyMMdd") # 20260502 let next_week = dt + 1.weeks echo next_week.format("yyyyMMdd") # 20260510 You can use the time intervals for addition, subtraction. |
![]() Blogjaim, hobbi projektjeim * The Ubuntu Incident [ edit ] |