Getting Date and Time Based on User Locale (Python Recipes)

preview_player
Показать описание
Hello everyone! In this video I'm going to be showing you how you can get your date and time formatted in the users current locale settings. Very useful if you want to make the user feel more at home with your apps!

▶ Become job-ready with Python:

▶ Follow me on Instagram:
Рекомендации по теме
Комментарии
Автор

3:48 Hey, you didn't appear to leave this link in the description as stated in the video

largewallofbeans
Автор

Thanks! That works great with date and time but not with numbers. No matter if I set LC_NUMERIC or LC_ALL to ("de_DE", "UTF-8") 12345.67 will always be shown as 12, 345.67 instead of the german version 12.345, 67 (comma as decimal separator)

BerndKircher
Автор

I love the typehints. I always use it also.
However I also prefer inserting an argument as a keyword argument (always) instead of a positional argument.
What do you think about it?
I find it more readable, easier to refactor and less prone to bugs.

kelthazur
Автор

I forget if you've done any C before, but if you have, could you do a comparison of altering locale in both C and Python? Maybe show the different ways to construct and print various Unicode characters? It might make for an interesting juxtaposition of the languages.

anon_y_mousse
Автор

I clicked on this out of curiosity (I don't work with Python), but holy moly, what font is that?! I don't know if it's the size, rendering or what, but it looks clean. I need that.

kaosoft
Автор

Make a video of your journey, set backs, motivation and how you got so good. Python is overwhelming, i love the language 😅❤

solomonbestz