A_DDD = Sa

Post a reply

Confirmation code
Enter the code exactly as it appears. All letters are case insensitive.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :| :mrgreen: :geek: :ugeek: :arrow: :angel: :clap: :crazy: :eh: :lolno: :problem: :shh: :shifty: :sick: :silent: :think: :thumbup: :thumbdown: :salute: :wave: :wtf: :yawn: :facepalm: :bravo: :dance: :beard: :morebeard: :xmas: :HeHe: :trollface: :cookie: :rainbow: :monkeysee: :monkeysay: :happybday: :headwall: :offtopic: :superhappy: :terms: :beer:
View more smilies

BBCode is ON
[img] is OFF
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: A_DDD = Sa

Re: A_DDD = Sa

Post by gregster » 23 Jan 2018, 13:48

Of course it is 'valid', but it is not what MS Windows uses.
How should AHK know what are common 3-letter abbreviations in all localizations of Windows? In german, you can use the first three letters but there might be languages where it is not unambiguous to do so, or you could get uncommon abbreviations.

Therefore, I think it is best to go with the system standard and let the user change that by a self-written function or an associative array, if needed, instead of messing around with the localization settings, especially if all standard windows calendars still display two letters in german windows (like in the system tray and the MonthCal GUI element).

Also, like it was mentioned, A_DDDD doesn't give you a 4-letter abbreviation either. And the only docs which talk about 3-letter abbreviations are the english v2 docs, anyway, which are in alpha stage... and A_DD finally gives you no letter abbreviation at all.

Re: A_DDD = Sa

Post by BoBo » 23 Jan 2018, 13:31

derz00 wrote:
SL5 wrote: A_DDD means for me the first 3 letters of the day :) thats all.


But as gregster said, in German the abbreviations are 2-letters. AHK uses the abbreviation of the current language, it doesn't decide that itself.

Not necessarily. In German, it's also valid to use the three character option (while those are often used with capitalized characters) therefore I would agree with derz00 to expect the three character format if A_DDD is used.
    'Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'
    'Son','Mon','Die','Mit','Don','Fre','Sam'
    'So','Mo','Di','Mi','Do','Fr','Sa'

Re: A_DDD = Sa

Post by derz00 » 22 Jan 2018, 09:17

SL5 wrote: There are certainly more important thinks to do.

Right. :lol:

But probably this should be clarified in the documentation.

Re: A_DDD = Sa

Post by SL5 » 20 Jan 2018, 18:34

Hello people, I have and just want to describe how I am reading it. I read in the documentary and there is DDD so I for me the first three characters. It's that simple. Intuitively, that's what it's like. AHK starts here automatically in German. That's just it. It will be the same with many others. Just the native language.
For me it seems normal that one first thinks of the first three characters in DDD. I like it when the first, the Intuitive thought fits. I gave the feedbank the way I did it and maybe it'll happen to me again if I do not think about it again first. Sure, you can just use A_DDDD and substring or something. No problem. So it seemed to me bug. If this just passes through the system default, then it's a little different than what I thought. Intuitively, I think you think differently. right? There are certainly more important thinks to do. And if it stays that way, it does not matter. What the hell. However, it would probably be no great effort to change that. I personally would like that. As then it is just not a bug, just slightly wrong to understand ;)

But on the other hand, e.g. DDDD equal to "Sams" no. And did I expect that? Honestly no. Oops. My inutuity is not quite consistent then. :silent: :think: so iam wrong

Re: A_DDD = Sa

Post by jeeswg » 20 Jan 2018, 17:07

- I had considered doing something like that before, but hadn't really had the need.
- Two things. One, it's a template, if you want to use some variant text for weekdays/months, e.g. fewer/more letters, or capitalisation. Two, it's a template, if you want to use more than one language in your script, or don't want to use the default language.

Re: A_DDD = Sa

Post by derz00 » 20 Jan 2018, 17:05

SL5 wrote: A_DDD means for me the first 3 letters of the day :) thats all.


But as gregster said, in German the abbreviations are 2-letters. AHK uses the abbreviation of the current language, it doesn't decide that itself.

Re: A_DDD = Sa

Post by derz00 » 20 Jan 2018, 17:03

jeeswg wrote:- Here's an example to give you the weekday/month in English.....

Can you explain: What is the purpose of this example? Please excuse my confused ingnorance.

Edit: Thanks, I understand that jeeswg.

Re: A_DDD = Sa

Post by SL5 » 20 Jan 2018, 16:03

gregster wrote:
jeeswg wrote:- Here's an example to give you the weekday/month in English.
I don't think that this was the scope of the question... or bug report. But who nows... there was not much of a question or a report, anyway. After all, I guess it won't hurt - obviously, it is no problem to shorten or expand the info the system gives you to whatever you like.

Yes its not prob for me to create a simple workaround.
For me it shows like a very little bug. A_DDD means for me the first 3 letters of the day :) thats all. i tried to report that. i have not a big problem with it.may in a year i forgot this discussion and then i havt this trouble again ;) so if you have time and fun please change it or rename the variable. thanks. and ahk is great :thumbup: yeaaah

Re: A_DDD = Sa

Post by gregster » 13 Jan 2018, 21:36

jeeswg wrote:- Here's an example to give you the weekday/month in English.
I don't think that this was the scope of the question... or bug report. But who nows... there was not much of a question or a report, anyway. After all, I guess it won't hurt - obviously, it is no problem to shorten or expand the info the system gives you to whatever you like.

Re: A_DDD = Sa

Post by jeeswg » 13 Jan 2018, 18:48

- Here's an example to give you the weekday/month in English.

Code: [Select all] [Expand]GeSHi © Codebox Plus


- I've also added this example here:
jeeswg's documentation extension tutorial - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=7&t=33596
- I would suppose that this example could easily be adapted for use with other languages.

Re: A_DDD = Sa

Post by gregster » 13 Jan 2018, 09:55

You seem to be in Germany, so 'Sa' for 'Samstag' seems to be the right output for today, assuming you are also running a german Windows... well, german windows uses 2-letter abbreviations, that is true.
So, I would rather consider that something for the "Improve the documentation" thread than a bug, because AHK just replicates information which it gets from the system. Since A_DDDD gets you the complete name and A_DD the 2-digit day of the month (01-31), A_DDD is the way to go to get the abbreviaton.

Btw, in the current online docs I only read "Current day of the week's abbreviation in the current user's language, e.g. Sun", nothing about "3-letter" anyway, if that is your concern. Correction: in v2 alpha docs (in english language) I can find "3-letter", german docs make no mention of the expected number, but give a 2-letter example, both in v1 and v2.

A_DDD = Sa

Post by SL5 » 13 Jan 2018, 03:33

A_DDD = Sa Current day of the week's 3-letter abbreviation in the current user's language, e.g. Sun

msg = A_DDD = %A_DDD% Current day of the week's 3-letter abbreviation in the current user's language, e.g. Sun
Clipboard := msg
ToolTip,% msg

Top