Open danieljrmay opened 5 years ago
I cloned your changes from https://github.com/danieljrmay/datetime-format , the release branch and it solved my problem for loading the extension settings page that didn't work at all on my new Ubuntu 18.10 installation (see #12).
Though I'm now experiencing some issues with the format I use: %Y-%m-%dT%H:%M:%S%z
Any ideas what this could be caused by?
--- EDIT --- Just took a look at the source code and more specifically the changes at https://github.com/danieljrmay/datetime-format/commit/ab34e68a9fc15c778c87c051c8a8235604714ec5#diff-3536874582afc79fb041cab92d9d46dbR15 %z does not seem to be implemented and "m" might be parsed wrong. Will take a closer look.
Sent a first pull request to you @danieljrmay regarding month format at https://github.com/danieljrmay/datetime-format/pull/1
Sent a second pull request to you @danieljrmay regarding %z functionality https://github.com/danieljrmay/datetime-format/pull/2. It is quick and dirty, not sure if you have any better idea on how to solve that issue properly.
I have pushed both of my changes into https://github.com/christofferholmstedt/datetime-format/tree/master
--- EDIT --- As reference https://stackoverflow.com/a/15304657
Hi Christoffer!
Sorry not to get back to you sooner, been a bit busy over the last few days. However, I wanted to acknowledge all your comments and contributions! I will have a chance to have a proper look at everything later this week and I will give you a proper response then. ;-)
Best wishes, Dan
Is this extension dead since there's still no update/reply 3 months later? That's a shame because I really like and use it in all my fresh installation of Ubuntu 18.04.2. It crashes in the latest 19.04 (gnome 3.32)
Hi @sudoranger
Is this extension dead since there's still no update/reply 3 months later? That's a shame because I really like and use it in all my fresh installation of Ubuntu 18.04.2. It crashes in the latest 19.04 (gnome 3.32)
I haven't had a response from @Daniel-Khodabakhsh the original author of this great little extension since I posted this issue. I forked the repository and have fixed the issue which prevented it running in my Fedora 29. @christofferholmstedt also added a couple of fixes to this fork and I think he had it running in a recent Ubuntu, not sure which version. You could give the fork a go and see if it works for you:
Installed today via https://extensions.gnome.org/extension/1173/datetime-format/ on GNOME Shell 3.32.2 on Fedora 30 and got:
The settings of extension datetime-format@Daniel-Khodabakhsh.github.com had an error:
TypeError: (new Date(...)).toLocaleFormat is not a function
Stack trace:
dateTimeFormat@/home/lorenz/.local/share/gnome-shell/extensions/datetime-format@Daniel-Khodabakhsh.github.com/Utilities.js:15:85
updatePreview@/home/lorenz/.local/share/gnome-shell/extensions/datetime-format@Daniel-Khodabakhsh.github.com/FormatTarget.js:49:25
create@/home/lorenz/.local/share/gnome-shell/extensions/datetime-format@Daniel-Khodabakhsh.github.com/FormatTarget.js:55:2
buildPrefsWidget/<@/home/lorenz/.local/share/gnome-shell/extensions/datetime-format@Daniel-Khodabakhsh.github.com/prefs.js:136:61
buildPrefsWidget@/home/lorenz/.local/share/gnome-shell/extensions/datetime-format@Daniel-Khodabakhsh.github.com/prefs.js:136:2
_selectExtension@resource:///org/gnome/shell/extensionPrefs/main.js:75:22
_onCommandLine@resource:///org/gnome/shell/extensionPrefs/main.js:320:17
main@resource:///org/gnome/shell/extensionPrefs/main.js:635:5
@<main>:1:43
First of all thank you so much for this excellent extension. I really like it as I can't remember what year it is these days!
Unfortunately the removal of
Date.toLocaleFormat()
— which is used in theUtilities.dateTimeFormat(format, defaultFormat)
function— has broken this extension.See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleFormat
I have forked your project and created a partial fix by essentially doing a limited re-implementation of
Date.toLocaleFormat()
. You can see my efforts at:https://github.com/danieljrmay/datetime-format
The changes are to
Utilities.dateTimeFormat(format, defaultFormat)
and a new fileDateTimeFormatter.js
which contains my limited re-implementation ofDate.toLocaleFormat()
.Although this does get the extension working, there are still a number of things which would have to be done before we get it production ready including:
DateTimeFormatter.js
.How would you like to proceed? I could issue a pull-request for what I have done so far, or I could carry on trying to get a "production ready" version before issuing the pull request. Or perhaps you have a different view on how this should all be done?
Thank you again for all your work on this.
Best wishes,
Dan