fuzion-lang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.
Fuzion
•
Idioms
•
Idiom # 99: Format date YYYY-MM-DD
Idiom # 99: Format date YYYY-MM-DD
See
programming-idioms.org
:
Code
x := "{d.year.as_string 4 10}-{d.month.as_string 2 10}-{d.day_of_month.as_string 2 10}"
What are effects?
Running Example
ex99 is # using custom date handler so output is always the same time.now.instate (time.now (()->time.date_time 2000 1 0 0 0 0)) ()-> d := time.now.get x := "{d.year.as_string 4 10}-{d.month.as_string 2 10}-{d.day_of_month.as_string 2 10}" say x
What are effects?
last changed: 2024-07-01
next: Idiom # 100: Sort by a comparator