'How to get regional/system locale settings in GO to display dates respecting user's locale [duplicate]
How is it possible to get the system locale in GO (platform independent), to enable dates to be displayed according to user's location?
The time.format allows you to specify a format to display time/dates in, but this assumes you want to specify the format explicitly. I would like to extract a "locale" from the users system and use a format that is suitable for the current region, much like the .net framework does this using a system locale. Perhaps in GO, it is not called "locale" which I may be the reason why I'm having trouble trying to find it, but I have tried other terms including region, to no avail.
Or perhaps there is a way to get a country code from the OS? At least that way I could map a country code to a display format manually myself.
Solution 1:[1]
When any application is in "Full Screen Mode", the menu bar is automatically hidden. However, if the app is "Zoomed", this following AppleScript code will toggle the autohide menu bar to on or off.
tell application "System Events"
if not autohide menu bar of dock preferences then
set autohide menu bar of dock preferences to true
else
set autohide menu bar of dock preferences to false
end if
end tell
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | wch1zpink |
