-
Notifications
You must be signed in to change notification settings - Fork 2.1k
<duration> mod <duration> gives duration, but said to be float #13298
Copy link
Copy link
Closed
Labels
status:needs-triageAn issue that hasn't had any proper lookAn issue that hasn't had any proper look
Milestone
Description
Describe the bug
<duration> mod <duration> gives another duration, but the type checker thinks it's a float.
How to reproduce
> 92sec mod 1min
32sec
> 92sec mod 1min | describe
duration
> 32sec / 1sec
32But…
> (92sec mod 1min) / 1sec
Error: nu::parser::unsupported_operation
× division is not supported between float and duration.
╭─[entry #6:1:1]
1 │ (92sec mod 1min) / 1sec
· ────────┬─────── ┬ ──┬─
· │ │ ╰── duration
· │ ╰── doesn't support these values
· ╰── float
╰────Expected behavior
> (92sec mod 1min) / 1sec
32Screenshots
Configuration
| key | value |
|---|---|
| version | 0.93.0 |
| major | 0 |
| minor | 93 |
| patch | 0 |
| branch | |
| commit_hash | ca5ee3d |
| build_os | windows-x86_64 |
| build_target | x86_64-pc-windows-msvc |
| rust_version | rustc 1.77.2 (25ef9e3d8 2024-04-09) |
| rust_channel | 1.77.2-x86_64-pc-windows-msvc |
| cargo_version | cargo 1.77.2 (e52e36006 2024-03-26) |
| build_time | 2024-05-01 12:53:36 -07:00 |
| build_rust_channel | release |
| allocator | mimalloc |
| features | dataframe, default, sqlite, system-clipboard, trash, which |
| installed_plugins |
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
status:needs-triageAn issue that hasn't had any proper lookAn issue that hasn't had any proper look
