fend icon indicating copy to clipboard operation
fend copied to clipboard

Date/Time support

Open printfn opened this issue 3 years ago • 5 comments

  • [x] Date objects: '2022-01-01' to date
  • [x] Better syntax for creating dates: @1970-01-01
  • [ ] ISO 8601 output format
  • [x] Simple date arithmetic: date + 5 days
  • [ ] Different date output formats
  • [ ] Durations, e.g. 2:23:28.936
    • [ ] Parse
    • [ ] Output
  • [ ] Timestamps syntax?
    • [ ] Timezones

printfn avatar Mar 21 '22 23:03 printfn

Unix epoch to timestamp would be very useful:

ideally, something like:

1666202400000 / 1000 to date Wed Oct 19 18:00:00 UTC 2022

(I have a file w/ a timestamp in milliseconds since the epoch)

britcey avatar Oct 24 '22 13:10 britcey

Date differences in ISO 8061 would a cool feature, for example

> '2022-11-06' - '2022-07-31'
98 Days

woodRock avatar Nov 06 '22 10:11 woodRock

Can |2022|01|01| be the syntax for dates?

frectonz avatar Nov 27 '22 20:11 frectonz

I went ahead and implemented a simple date syntax:

> @1970-01-01
Thursday, 1 January 1970
> @2000-01-01 + 10000 days
Wednesday, 19 May 2027

printfn avatar Nov 28 '22 08:11 printfn