|
Oktatás * Programozás 1 * Szkriptnyelvek Teaching * Programming 1 (BI) Félévek Linkek * kalendárium |
Nim2 /
Get the current dateSee also std/times import std/times proc get_current_date(): string = now().format("yyyy'_'MM'_'dd") proc main() = let date = get_current_date() echo date # 2026_04_26 main() Note that However, some characters don't have to be between apostrophes. In addition to spaces, the following characters can be inserted without quoting them: Date object → stringSee the example above. String → date objectimport std/times let text = "20260503" dt: DateTime = parse(text, "yyyyMMdd") reformatted: string = dt.format("yyyy-MM-dd") echo reformatted # 2026-05-03 |
![]() Blogjaim, hobbi projektjeim * The Ubuntu Incident [ edit ] |