Humanizer icon indicating copy to clipboard operation
Humanizer copied to clipboard

float DateTime values in F#

Open thomasd3 opened this issue 3 years ago • 0 comments

In F#, the values passed to DateTime are doubles.

For example: DateTime.UtcNow.AddDays(1.) (note it is '1.' and not '1')

This makes the Humanizr DateTime fluent interface a bit awkward:

let d = DateTime.Now + (1.).Days()

since

let d = DateTime.Now + 1.Days()

wouldn't work.

Is there a way to take an int and convert it in the expression?

thomasd3 avatar Aug 28 '21 21:08 thomasd3