printfn / fend

Arbitrary-precision unit-aware calculator
https://printfn.github.io/fend
MIT License
668 stars 52 forks source link

Date/Time support #148

Open printfn opened 2 years ago

printfn commented 2 years ago
britcey commented 2 years ago

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)

woodRock commented 2 years ago

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

> '2022-11-06' - '2022-07-31'
98 Days
frectonz commented 1 year ago

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

printfn commented 1 year ago

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
illdefined commented 2 months ago

I often have to convert dates and times between different time zones and I would love to be able to that with fend.