Jupyter Lab and ISO 8601

103 views
Skip to first unread message

Milos Miljkovic

unread,
Feb 22, 2018, 1:35:08 PM2/22/18
to Project Jupyter
Hiya,

Is there a way in Jupyter Lab to display "Last modified" column in Files tab in ISO 8601 format? Current format of "a xyz ago" is utterly useless. If there isn't a way to do this, where should I have a peek for a PR.

Cheers,

Miloš.

Matthias Bussonnier

unread,
Feb 22, 2018, 1:49:02 PM2/22/18
to jup...@googlegroups.com
I believe if you hover over the date, there should be a tooltip with the exact date and time. 
-- 
M

--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+unsubscribe@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/4330075a-a9f0-4430-8344-107d44da3dd8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Milos Miljkovic

unread,
Feb 22, 2018, 2:15:37 PM2/22/18
to Project Jupyter
Thanks Matthias! Indeed, there's a tooltip if you hover over current vague time stamp. Is there a way to make this "a xyz ago" malarkey go away and show what's in the tooltip in its place?


On Thursday, February 22, 2018 at 1:49:02 PM UTC-5, Matthias Bussonnier wrote:
I believe if you hover over the date, there should be a tooltip with the exact date and time. 
-- 
M
On 22 February 2018 at 10:35, Milos Miljkovic <mmiljk...@gmail.com> wrote:
Hiya,

Is there a way in Jupyter Lab to display "Last modified" column in Files tab in ISO 8601 format? Current format of "a xyz ago" is utterly useless. If there isn't a way to do this, where should I have a peek for a PR.

Cheers,

Miloš.

--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.

Matthias Bussonnier

unread,
Feb 22, 2018, 2:23:37 PM2/22/18
to jup...@googlegroups.com
Probably, 

If it's using moment.js it's possible, but I haven't touched that part of the code base. We could do something similar as the notebook and switch to iso-date when the file is older than a couple of hours/days.
I would suggest opening an issue.

To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+unsubscribe@googlegroups.com.

To post to this group, send email to jup...@googlegroups.com.

Milos Miljkovic

unread,
Feb 22, 2018, 4:41:19 PM2/22/18
to Project Jupyter
OK, I will open an issue. OTOH, I haven't seen the behavior you described for the notebook to switch to ISO date when a file is older than certain limit.

Brian Granger

unread,
Feb 23, 2018, 11:55:20 PM2/23/18
to Project Jupyter
I think we are using moment.js. Not sure how I feel about showing
users ISO 8601 formatted datetimes though. It is not a particularly
human friendly datetime format. Maybe having some sort of toggle in
the UI to switch between the moment.js times and a more human friendly
variant of the ISO 8601 information? We aren't alone in using the
moment.js style date/times (GitHub does for everything).
> https://groups.google.com/d/msgid/jupyter/fcbc4bbb-8d0d-453c-97ff-b48c64ae312c%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



--
Brian E. Granger
Associate Professor of Physics and Data Science
Cal Poly State University, San Luis Obispo
@ellisonbg on Twitter and GitHub
bgra...@calpoly.edu and elli...@gmail.com

Lawrence D’Oliveiro

unread,
Feb 27, 2018, 1:11:21 AM2/27/18
to Project Jupyter
On Saturday, February 24, 2018 at 5:55:20 PM UTC+13, ellisonbg wrote:
Not sure how I feel about showing users ISO 8601 formatted datetimes though.
It is not a particularly human friendly datetime format.

It’s standard in Japan. And it is an international standard, after all. Besides which, it makes logical sense.

Jason Grout

unread,
Feb 27, 2018, 2:17:23 AM2/27/18
to jup...@googlegroups.com
I think there's definitely room for configuring the filebrowser to show ISO-formated dates. We also need to deal with sorting based on date, and many other things.

--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.

Roland Weber

unread,
Feb 27, 2018, 2:20:22 AM2/27/18
to Project Jupyter
Not sure how I feel about showing users ISO 8601 formatted datetimes though.
It is not a particularly human friendly datetime format.

It’s standard in Japan. And it is an international standard, after all. Besides which, it makes logical sense.

Date and time formatting are usually subject to localization. If properly supported by a web application, switching the browser to a different locale - for example Japanese instead of US English - will also affect the formatting of dates and times.

The interesting question is whether Jupyter Lab supports localization of dates and times. If it doesn't, then the feature request should be about adding localization, not about changing the single supported date/time format to somebody else's preferences. There is no single format that will be to everybody's liking.

cheers,
  Roland

PS:  Don't argue with standards... I will NEVER say K-bi-byte! ;-)

Milos Miljkovic

unread,
Feb 27, 2018, 3:57:04 PM2/27/18
to Project Jupyter
I understand that to some people ISO 8601 is not user/human friendly. Also, further down in the discussion, someone mentioned using local date/time settings, which is also a sensible way of dealing with date/time. There are probably things of higher priority to be taken care of first, but if I voted, I'd go for some sort of user configurable setting in ~/.jupyter/lab/user-settings It looks like moment.js supports all sorts of date/time formats and locales.

Cheers!

Björn Johansson

unread,
Feb 28, 2018, 5:59:18 AM2/28/18
to Project Jupyter
It is also standard in many European countries as well and recommended by xkcd...   

Brian Granger

unread,
Feb 28, 2018, 3:44:57 PM2/28/18
to Project Jupyter
Sorry folks, things are crazy this week so I am a bit behind on emails...

From the user experience perspective there are two questions a user
might be interested in:

1) At what exact time was this document last edited? The ISO 8601
format is possibly the right format for that information. I am not
arguing against the ISO standard.
2) How long ago did I edit that document (in human terms)? ISO 8601 is
sub-optimal for that as a user has to look at something like
"2018-02-28T15:25:47+00:00", then look at their current time and do
that math to figure out "oh, that was 5 minutes ago". The moment js
style is optimized to answer this question. I would love to do a
quantitative users test for that (probably won't happen due to time).

The difference between these two outputs isn't about standards, it is
about what question the user is trying to answer. Furthermore, that
question may change depending on what a user is doing (it changes over
time for a single user). Because of that, I don't think putting this
as a configuration option makes sense. Having a UI control that allows
a user to quickly switch date formats on the fly is probably more
appropriate. In terms of the default, my hypothesis is that question
2) above is the question users are asking the majority of the time.
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jupyter+u...@googlegroups.com.
> To post to this group, send email to jup...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jupyter/71b33713-d5b9-4574-94be-60be34ad02d3%40googlegroups.com.

Matthias Bussonnier

unread,
Feb 28, 2018, 4:05:20 PM2/28/18
to jup...@googlegroups.com
On 28 February 2018 at 12:44, Brian Granger <elli...@gmail.com> wrote:
 
2) How long ago did I edit that document (in human terms)? ISO 8601 is
sub-optimal for that as a user has to look at something like
"2018-02-28T15:25:47+00:00", then look at their current time and do
that math to figure out "oh, that was 5 minutes ago". The moment js
style is optimized to answer this question. 

I disagree with this statement. While this may be true for short amount of time, having 20 documents "5 month ago" is useless.

1) Because "5 month ago" was.. heu.. well we're feb 28, so we're kinda in march already. Is that 5 month ago day for day +/- 15 days ? that is to say .. Feb, Jan, Dec, Nov.... Oct 15 to Nov 15th , Or is it from Oct 1st to Oct 31st ?
2) Complete lack of granularity. There's a big difference between something last year in Dec and in July.

This is the exact reason the Classic notebook UI switch format after a certain time.
-- 
M

 

Paul Ivanov

unread,
Feb 28, 2018, 4:42:51 PM2/28/18
to jup...@googlegroups.com
On 28 February 2018 at 12:44, Brian Granger <elli...@gmail.com> wrote:
 
2) How long ago did I edit that document (in human terms)? ISO 8601 is
sub-optimal for that as a user has to look at something like
"2018-02-28T15:25:47+00:00", then look at their current time and do
that math to figure out "oh, that was 5 minutes ago". The moment js
style is optimized to answer this question. 

Like Matthias, I also disagree. I'd say moment js is optimized for *some* people's preference for answering such a question. 

The difference between these two outputs isn't about standards, it is
about what question the user is trying to answer.

I agree with this, but I would add that even if you fix the question the user is trying to answer, the kind of answer the user wants in response will vary user. I would rather have no moment js fuzzy logic anywhere. I know I am not alone. I treat time as coordinate system with a static frame of reference- I totally understand some people do not have that preference. I want to know which files I modified in the mornings versus in the afternoon or late at night. I want to think about the files that were written on February 28, 2018, and not have that file be referred to as "a day", "a week", "a month" ago at various time points down the line.

Furthermore, that
question may change depending on what a user is doing (it changes over
time for a single user). Because of that, I don't think putting this
as a configuration option makes sense. Having a UI control that allows
a user to quickly switch date formats on the fly is probably more
appropriate. In terms of the default, my hypothesis is that question
2) above is the question users are asking the majority of the time.

That may be true, but the desired answer can still vary by user.


 

--
                   _
                  / \
                A*   \^   -
             ,./   _.`\\ / \
            / ,--.S    \/   \
           /  `"~,_     \    \
     __o           ?
   _ \<,_         /:\
--(_)/-(_)----.../ | \
--------------.......J
Paul Ivanov
http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7

Brian Granger

unread,
Feb 28, 2018, 4:43:15 PM2/28/18
to Project Jupyter
Matthias, helpful thoughts! I think your example points to a third
question a user might be trying to answer:

3) "How are the last modified times of these notebooks differ?"

I fully agree that seeing a set of notebooks with a time of "X Y ago"
is not helpful tin answering that question. However, I don't think the
usability issues are unique to "long times" ago. For example, it would
be just as painful to see a few notebooks that say "5 minutes ago" as
"5 month ago" if I am trying to answer this third question.

Maybe these 3 questions can be viewed along another dimension:

a) is a user interested in the time of a single file
b) is the user interested in comparing times of multiple files

Does this way of looking at it make sense?
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jupyter+u...@googlegroups.com.
> To post to this group, send email to jup...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jupyter/CANJQusWgc5Lbiv9pCXgPGFeBbtCBHCSXQxRoFepxKvgz2x2Sug%40mail.gmail.com.

Brian Granger

unread,
Feb 28, 2018, 4:53:25 PM2/28/18
to Project Jupyter
Paul - thanks.

What I hear you saying is that you aren't primarily interested in the
"how long ago" question, but more the "when" question. And that when
you think about the "when" question, you want a good amount of
fidelity.

Is that a good summary?

I am trying to understand if you don't find the moment.js style useful
because 1) you aren't trying to answer the question it answers (how
long ago) or 2) it is answering the right question in a non-helpful
manner.

For example, one could imagine answering the "how long ago" question
using an high fidelity ISO 8601 time *interval* format:

https://en.wikipedia.org/wiki/ISO_8601#Time_intervals

I am trying to understand and separate the mental model of the user
from the format question (which depends on the mental model)...

I also wonder if someone has done UX research on the display of
date/times @tgeorgeux ?
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jupyter+u...@googlegroups.com.
> To post to this group, send email to jup...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jupyter/CAKCGbV4uoU8reG3XaPrFmd-HEuMk_%2BTmm_C%3DpF7jz2REXw%3DjyQ%40mail.gmail.com.

Thomas Kluyver

unread,
Feb 28, 2018, 5:14:01 PM2/28/18
to Project Jupyter
Chiming in with my own anecdote: I most frequently use modified times to find files I've edited recently (today or last few days). I find that an 'intelligent' presentation of information makes this easier than displaying a common date format for every file.

For instance, here's some modified times in Gnome's file manager. It's a different approach from moment.js, and it preserves more precision, but it makes it very easy to distinguish a file changed today, this week, this year and longer ago, without having to read much or remember what the date is.


Inline images 1


> To post to this group, send email to jup...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jupyter/CAKCGbV4uoU8reG3XaPrFmd-HEuMk_%2BTmm_C%3DpF7jz2REXw%3DjyQ%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.



--
Brian E. Granger
Associate Professor of Physics and Data Science
Cal Poly State University, San Luis Obispo
@ellisonbg on Twitter and GitHub
bgra...@calpoly.edu and elli...@gmail.com

--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+unsubscribe@googlegroups.com.

To post to this group, send email to jup...@googlegroups.com.

Matthias Bussonnier

unread,
Feb 28, 2018, 5:27:44 PM2/28/18
to jup...@googlegroups.com
On 28 February 2018 at 13:42, Brian Granger <elli...@gmail.com> wrote:
Matthias, helpful thoughts! I think your example points to a third
question a user might be trying to answer:

3) "How are the last modified times of these notebooks differ?"

I fully agree that seeing a set of notebooks with a time of "X Y ago"
is not helpful tin answering that question. However, I don't think the
usability issues are unique to "long times" ago. For example, it would
be just as painful to see a few notebooks that say "5 minutes ago" as
"5 month ago" if I am trying to answer this third question.

Yes, except ISO 8601 does not "loose granularity" when time passes. I'm going to assume that if we format to iso, we'll add HH:MM but not SS, 
so having 5 notebooks "at 14:16" or 5 notebooks "5 minutes ago" is the same. You can't differentiate regardless  of moment.js vs iso. 
If the 5 notebooks are from 5 different days in Jan, with ISO I can still distinguish, with moment I can't.

So I believe issues are exacerbated with old files.

in other words, the issue with moment.js "Smart" format is that 2 notebooks differentiable today, will not be tomorrow. The buckets get larger too fast. 
I like Thomas' example of Gnome, which does (seem to) strike a nice balance.
-- 
 

Brian Granger

unread,
Feb 28, 2018, 5:55:06 PM2/28/18
to Project Jupyter
On a call right now, but I really like the example from Gnome that
Thomas posted.
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jupyter+u...@googlegroups.com.
> To post to this group, send email to jup...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jupyter/CANJQusVbXHaQX7xozAeBfxQAkPDrjEZxiFKqGgrWOK1FCtMsiw%40mail.gmail.com.

Milos Miljkovic

unread,
Mar 1, 2018, 12:57:38 PM3/1/18
to Project Jupyter
This is an awesome sample of different granularity at work. I hope it does not use BS 'Today' stamp, it looks it doesn't since today's files are stamped with HH:MM.

> To post to this group, send email to jup...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jupyter/CAKCGbV4uoU8reG3XaPrFmd-HEuMk_%2BTmm_C%3DpF7jz2REXw%3DjyQ%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.



--
Brian E. Granger
Associate Professor of Physics and Data Science
Cal Poly State University, San Luis Obispo
@ellisonbg on Twitter and GitHub
bgra...@calpoly.edu and elli...@gmail.com

--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.

To post to this group, send email to jup...@googlegroups.com.

Damián Avila

unread,
Mar 1, 2018, 3:51:58 PM3/1/18
to jup...@googlegroups.com
For instance, here's some modified times in Gnome's file manager. It's a different approach from moment.js, and it preserves more precision, but it makes it very easy to distinguish a file changed today, this week, this year and longer ago, without having to read much or remember what the date is.

That is a nice implementation and I think it covers both audiences.

To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+unsubscribe@googlegroups.com.

To post to this group, send email to jup...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Damián Avila
Reply all
Reply to author
Forward
0 new messages