Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unaligned display(::Matrix{Any}) containing ZonedDateTime #53480

Open
GHTaarn opened this issue Feb 26, 2024 · 0 comments
Open

unaligned display(::Matrix{Any}) containing ZonedDateTime #53480

GHTaarn opened this issue Feb 26, 2024 · 0 comments
Labels
domain:display and printing Aesthetics and correctness of printed representations of objects.

Comments

@GHTaarn
Copy link

GHTaarn commented Feb 26, 2024

The output of the following code:

using TimeZones

x=[ZonedDateTime("2024-02-20T14:30:46.022+00:00") 4.0 403.52;
ZonedDateTime("2024-02-20T14:30:21.026+00:00") 3.0 403.24;
ZonedDateTime("2024-02-20T14:30:20.916+00:00") 3.0 403.27;
ZonedDateTime("2024-02-23T15:25:18.592+00:00") 1.0 412.98;
ZonedDateTime("2024-02-12T17:52:00.015+00:00") 9.0 714.32;
ZonedDateTime("2024-02-20T14:30:44.072+00:00") 5.0 403.53;
ZonedDateTime("2024-02-20T14:30:16.573+00:00") 1.0 403.33;
ZonedDateTime("2024-02-20T14:30:09.902+00:00") 5.0 403.36;
ZonedDateTime("2024-02-20T14:30:49.156+00:00") 1.0 403.35;
ZonedDateTime("2024-02-20T14:30:09.272+00:00") 2.0 403.27;]

display(x)

produces the output

10×3 Matrix{Any}:
 2024-02-20T14:30:46.022+00:00   4.0  403.52
 2024-02-20T14:30:21.026+00:00   3.0  403.24
 2024-02-20T14:30:20.916+00:00  3.0  403.27
 2024-02-23T15:25:18.592+00:00  1.0  412.98
 2024-02-12T17:52:00.015+00:00    9.0  714.32
 2024-02-20T14:30:44.072+00:00   5.0  403.53
 2024-02-20T14:30:16.573+00:00  1.0  403.33
 2024-02-20T14:30:09.902+00:00   5.0  403.36
 2024-02-20T14:30:49.156+00:00  1.0  403.35
 2024-02-20T14:30:09.272+00:00   2.0  403.27

i.e. columns 2 & 3 are not aligned even though column 1 has fixed width.

hcat(string.(x[:,1]), x[:,2:3]) produces perfectly aligned output.

I have tested on Julia version 10.1 and a fairly recent nightly build (1.12.0-DEV.50)

@oscardssmith oscardssmith added the domain:display and printing Aesthetics and correctness of printed representations of objects. label Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:display and printing Aesthetics and correctness of printed representations of objects.
Projects
None yet
Development

No branches or pull requests

2 participants