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

marioclock: use short date format from locale, take timeout from sett… #167

Merged
merged 3 commits into from
Mar 31, 2020
Merged

marioclock: use short date format from locale, take timeout from sett… #167

merged 3 commits into from
Mar 31, 2020

Conversation

DerGuteWolf
Copy link
Contributor

…ings

@gfwilliams
Copy link
Member

Thanks - it's tricky about the timeout... Bangle.js keeps the screen on whenever there's a .flip - but if you're animating then that's going to keep the screen on.

Maybe I could make that one of the Bangle.setOptions so your clock can turn it off when it boots, in order to allow the clock to sleep?

@gfwilliams gfwilliams merged commit 3c21bc6 into espruino:master Mar 31, 2020
@DerGuteWolf
Copy link
Contributor Author

DerGuteWolf commented Mar 31, 2020

@gfwilliams : Unfortunatly the few bytes more apparently means we get hit by "Upload Failed, got UNFINISHED STRING expected EOF" now. I only tested uploading the app with the IDE... I will try some changes and open a new pull request

@DerGuteWolf DerGuteWolf deleted the patch-1 branch March 31, 2020 09:17
@gfwilliams
Copy link
Member

I'll fix that issue with the App Uploader today, so I wouldn't be too concerned.

@paulcockrell
Copy link
Contributor

@DerGuteWolf How do I go about selecting the original date format?

@DerGuteWolf
Copy link
Contributor Author

The setting is taking from the locale app, ie what is selected during installation/update of this app.

@paulcockrell
Copy link
Contributor

Oh right, I might be missing something here, in Settings->Locale only see time-zone and clock-style, but nothing to do with date formatting.

@DerGuteWolf
Copy link
Contributor Author

@paulcockrell : Yes, the language to be used is not in settings but in the locale app.

@paulcockrell
Copy link
Contributor

@DerGuteWolf Looks to me like I can't get the original date format back in that case, and am stuck with this short date.

@gfwilliams
Copy link
Member

Not sure I understand your problem? You install the Language app in the App Loader to set the language, and if you don't like it you can just remove the app.

In terms of Date format, locale.date(new Date(), true); gives you a short date, but locale.date(new Date(), false); will give you a long one

@DerGuteWolf
Copy link
Contributor Author

DerGuteWolf commented Apr 2, 2020

@paulcockrell : locale defines only two variants: short and long (and long is really long in some locales - but only some - and thus won't fit). The original format was a mixture between both and there is no support in locale to localize such an intermediate variant. Perhaps you should suggest adding a third variant to @gfwilliams .

Alternativy we could first try long, remove the four-digit year and if it fits, use this and otherwise use the short version (also with four-digit year removed).

@paulcockrell
Copy link
Contributor

My problem is I want to see the Day name and day number as I originally wrote it. The year is not something I need reminding of.

@DerGuteWolf
Copy link
Contributor Author

DerGuteWolf commented Apr 2, 2020

@gfwilliams : Part of the problem here comes also from the fact, that esp the long versions are not consistent in the various locales, eg en_gb "Feb 28 2020" (which I would consider an intermediate variant as no weekday and month abbrev) vs de_de "Sonntag, 1. März 2020" (which is really the long variant, full weekday and full month).

@DerGuteWolf
Copy link
Contributor Author

@paulcockrell: I understand, but this is unfortunatly currently not localisable....

@paulcockrell
Copy link
Contributor

paulcockrell commented Apr 2, 2020

@DerGuteWolf It's fine, I understand making it valid for various locales is important for other users. So I appreciate the change you put in. Maybe it's just me, but I do need reminding what the day of the week is, they all blend in to one :-)

@DerGuteWolf
Copy link
Contributor Author

DerGuteWolf commented Apr 2, 2020

@paulcht: see #183 , what do you think?

gfwilliams added a commit that referenced this pull request Apr 2, 2020
Take into account discussion from #167
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants