Oregami
Repositories/oxedyne/fe2o3

oxedyne/fe2o3/fe2o3_austenite/tests/fixtures/eval/foundation/datetime.txt

2.8 KiB, 1 run

created by r1870400018:63828, which is this file's identity for as long as the history lasts, whatever it is later renamed to

download · who wrote it · its history

1// datetime and duration: construction, display patterns, fields and errors.
2datetime(year: 2024, month: 3, day: 5)
3datetime(year: -5, month: 1, day: 1)
4datetime(year: 2024, month: 2, day: 29)
5datetime(hour: 7, minute: 5, second: 9)
6datetime(year: 2024, month: 3, day: 5).display()
7datetime(hour: 7, minute: 5, second: 9).display()
8datetime(year: 2024, month: 3, day: 5, hour: 7, minute: 5, second: 9).display()
9datetime(year: 2024, month: 3, day: 5).display("[day].[month].[year]")
10datetime(year: 2024, month: 3, day: 5).display("[month repr:long] [day padding:none], [year repr:last_two]")
11datetime(year: 2024, month: 3, day: 5).display("[weekday] [weekday repr:short] [weekday repr:sunday] [weekday repr:monday one_indexed:false] [ordinal] [month repr:short] [week_number] [week_number repr:sunday] [week_number repr:monday]")
12datetime(hour: 17, minute: 5, second: 9).display("[hour repr:12]:[minute] [period] [period case:lower] [hour padding:space]")
13datetime(hour: 0, minute: 0, second: 0).display("[hour repr:12] [period]")
14datetime(year: 2024, month: 3, day: 5).display("[year sign:mandatory] [year repr:full] [day padding:space] [month padding:none]")
15datetime(year: 2024, month: 3, day: 5).display("[year repr:century] [year base:iso_week] [month repr:numerical]")
16datetime(year: 2021, month: 1, day: 1).display("[year base:iso_week]-W[week_number]")
17datetime(year: 2020, month: 12, day: 31).display("[week_number] [week_number repr:sunday] [ordinal]")
18datetime(year: 2024, month: 3, day: 5).display("[weekday repr:long case_sensitive:false]")
19datetime(year: -5, month: 1, day: 1).display()
20datetime(year: 2024, month: 3, day: 5).weekday()
21datetime(year: 2024, month: 3, day: 10).weekday()
22datetime(year: 2024, month: 3, day: 5).ordinal()
23datetime(year: 2024, month: 12, day: 31).ordinal()
24datetime(year: 2024, month: 3, day: 5).year()
25datetime(year: 2024, month: 3, day: 5).month()
26datetime(year: 2024, month: 3, day: 5).day()
27datetime(year: 2024, month: 3, day: 5).hour()
28datetime(hour: 1, minute: 2, second: 3).minute()
29datetime(hour: 1, minute: 2, second: 3).second()
30datetime(hour: 1, minute: 2, second: 3).year()
31datetime(hour: 1, minute: 2, second: 3).weekday()
32duration(days: 1, hours: 2).hours()
33duration(seconds: 90).minutes()
34duration(weeks: 1).days()
35duration(days: 3).weeks()
36duration(minutes: 2).seconds()
37duration(seconds: -90)
38type(datetime.today())
39!datetime(year: 2023, month: 2, day: 29)
40!datetime(year: 2023, month: 13, day: 1)
41!datetime(year: 2023, month: 1)
42!datetime(hour: 25, minute: 0, second: 0)
43!datetime(hour: 1, minute: 60, second: 0)
44!datetime(year: 2023, month: 1, day: 1, hour: 1)
45!datetime()
46!datetime(year: 100000, month: 1, day: 1)
47!datetime(hour: 17, minute: 5, second: 9).display("[year]")
48!datetime(year: 2024, month: 3, day: 5).display("[bogus]")
49!datetime(year: 2024, month: 3, day: 5).display("[unix_timestamp]")