Qt5: date format MMM, in Spanish, remove point - date

In Qt5, the MMM format, which displays the month name in a short format (e.g., "Dec" instead of "12" or "December"), when using it for the Spanish locale, shows the abbreviated month name with a dot at the end, for example, for, "25th December 2016", in MMM/dd/yyyy format, shows "Dic./25/2016".
The problem is when editing. For displaying a date, it's ok, since it's what the Spanish rules say, but it isn't suitable for editing. I'm forced to position the cursor just after the point, at the end of the month part, to delete the point, and then, the rest of the month name. If I try to put the cursor just before the point, to edit just the month name part, the field is in "read-only" mode. I can't not remove anything, unless I remove everything from the very right of the line and back, character to character (or just selecting the whole month part and remove everything).
Besides, the point is not autocompleted. So, if the user writes the new month forgetting the dot, the edition is rejected and fall backs to the original value.
Taking all of it into account, editing a QDateEdit is a bit cumbersome (in Spanish).
I don't know if it is the built-in QDateEdit behaviour, or internally it is using a QRegExpValidator, but in that case, I don't know what it's the regexp expression, to personalize it from it.
In short, how can I "solved" it? (the cumbersome edition; it's ok for me both, removing the dot, or changing the validation).

The Qt 5 behavior is correct and there's nothing Qt can do (or should do). The only correct and acceptable short name of December in a es_ES locale is "dic.", trailing dot included. That's what CLDR says:
http://www.unicode.org/cldr/charts/30/summary/es.html#1636
http://www.unicode.org/cldr/charts/30/verify/dates/es.html

Related

VFP9 app different date format on different servers

I have the same executable for a VFP9 app running on 2 servers.
On server 1 when user enters date 10/01/2022 into a text field with format property set to KD, and when text field loses focus, the value in the text field gets changed to 10/1/2022.
On server 2 when user enters date 10/01/2022 into a text field with format property set to KD, and when text field loses focus, the value in the text field does not get changed so it remains 10/01/2022.
I believe the format property having the D means to use windows settings and from what I have read/googled, perhaps the windows short date may be different on the 2 servers. Not really sure about any of that. Also, I can't find any VFP or otherwise documentation that would tell me from inside my VFP app, the windows setting for "is short date on?".
Any help appreciated,
John
tell me from inside my VFP app, the windows setting for "is short date on?"
I'd put it like: a local VFP instance's Date display is not affected by O/S setting as long as your code does not Set SysFormats On. The following custom check works for me in an En/US Windows as well as a German, and a French Windows UI. What are yours?
SET DATE SHORT
? ISALPHA(DTOC(DATE())) && returns .F.
SET DATE LONG
? ISALPHA(DTOC(DATE())) && returns .T.
As for the comment:
Perhaps this is a simpler asking of my question: The same exact executable is running on 2 servers. lddate=ctod("09/20/2022") On server 1, ?dtoc(lddate) returns "09/20/2022" On server 2 ?dtoc(lddate) returns "9/20/2022". What is causing the different results
Nobody can tell without seeing the two server's regional settings and the foxpro code of your executable.
Try to remove or disable any
Set Sysformats On
line in the foxpro code, the default settings there ought to be as documented
https://www.vfphelp.com/help/_5wn12pf0l.htm
The default date setting is AMERICAN
i.e. dtoc(Date(2022,9,20)) should return "09/20/2022" on both servers
Another possible cause could be a combination of an unusual Windows Short Date format. e.g. like d/M/yyyy, together with doing a SET DATE SHORT in the foxpro code

LibreOffice : how shall I change the names of the weekdays in date format

In LibreOffice, I wish to change the weekdays names to have something shorter.
In French, the date format "ddd dd/mm/yy" applied to today 2021-08-17 gives : "mar. 17/08/21". I would prefer "ma 17/08/21" to have narrower columns.
So I wish to change the existing weekdays names "lun., mar., mer., jeu., even., sam., dim." to something shorter : "lu, ma, me, je, ve, sa, di", through the format used by LibreOffice.
I played with French locales (Swiss French, etc.) but it is not satisfactory. I tried to change the list for the sort but it has no effect on the date format.
Is it possible to change the list LibreOffice uses for the weekdays ? How shall I proceed ?
You cannot do this with normal formatting (unless you require a change to the national date standard).
However, you can easily get the desired date representation using the TEXTE() and REGEX() functions.
=REGEX(TEXT(A1;"OOO JJ/MM/AA");"(..)([^\.]*\.)(.+)";"$1$3";"g")
Or shorter notation using LEFT() (GAUCHE()):
=LEFT(TEXT(A1;"OOO");2)&TEXT(A1;"\ JJ/MM/AA")
Remember to check that the cell format is French, otherwise you will get an error (not every language uses O-J-A characters)

JCL append date/time to a file?

How do I add the current date/time to a file in JCL?
For example, from the JCL:
//INPUT DD *
CGQ-TEST.ISQCQ.NET
ASCII
LOCSITE SBD=SYSP.FTP.RCAMSI
SENDSITE
PUT 'TJ.UTJ0IR86.BC814.HDR' BC814001.TMP
APPEND 'TJ.UTJ4IR86.BC(0)' BC814001.TMP
APPEND 'TJ.UTJ0IR86.BC814.TRL' BC814001.TMP
RENAME BC813001.TMP BC814001.TXT
CLOSE
QUIT
I need the file BC814001.TXT to actually be BC814001.20160930.110900.ent, where 20160930.110900 is current date and time (YYYYMMDD.HHMMSS format).
The best way to do this is to use the features of your job scheduling package (Control-M or one of its competitors). It's usually the most maintainable. Talk to your production control staff.
If for some reason that won't work for you, please see this answer.
The convention fd dataset level qualifiers limits you only to 8 characters per section (space between dots) and it should start with a character not a number.
Each name segment (qualifier) is 1 to 8 characters, the first of which must be alphabetic (A to Z) or national (# # $). The remaining seven characters are either alphabetic, numeric (0 - 9), national, a hyphen (-). Name segments are separated by a period (.).
For z/OS environments I would go with 'day of the year' for the actual date. For example in your case - BC814001.D2016274.T110900.ent.
To get the current date and time You can refer to the TSO DATE and TSO TIME via REXX and format them the way You like (examples here http://www.rexxla.org/rexxlang/mfc/datec.html) then pass them as a variable to your SYSIN statement.
Regards,
Jarek.

My dollar signs are now little boxes

This week we upgraded to JasperReports Server 4.7 (Professional) and iReport 4.7. I have several reports that I created in iReport 4.5.1 and successfully used in JasperReports Server 4.5.1.
After the upgrade, all of my dollar signs are now little boxes. The pattern for my currency fields is ¤ #,##0.00. JasperReports Server is not replacing the box with a dollar sign when the report is generated. Everything looks ok in the pattern sample. My percentage symbols are all still working. I tried removing and applying the currency pattern to the fields again, but this didn't fix the problem.
Any thoughts on how I can fix this?
This is Java operating as intended... but not as you want it to operate. Your locale does not specify a currency, so you get that "¤" symbol.
You could workaround it by changing your locale from "en" to "en_US". I just did this last week. As a side note, I found one tweak that I needed to make. After changing the locale to en_US I needed to copy one file like this:
cp .../jasperserver-pro/scripts/jquery/js/jquery.ui.datepicker-en.js .../jasperserver-pro/scripts/jquery/js/jquery.ui.datepicker-en-US.js
Alternatively, I usually find it's better to work around it by setting your format mask to use a hard-coded dollar sign. If you are displaying "$50.00" to a user in the United States, it would be nonsensical to display "€50,00" to a European user or "¥50.00" to a Japanese user for the same value. There are lots of times when the hard-coded currency symbol is more appropriate.

What's the correct direction of a date embedded in arabic text?

The question is quiet simple: I've got an arabic text with an US formated Date in it. What is the correct display order of this date? Is it(for instance) 01/10/2009 or 2009/10/1?
The bidi algorithm recognizes the numbers an slashes as neutral and orders them in the same direction like the surrounding text. So the date should be backwards but that's not what any browser does. On the other hand, i can't find any rule in the unicode bidi algorithm which excludes date patterns. So, what is correct here and (especially) why?
without going deep in the technical details
I can tell that 01/10/2009 is the correct one and some times it's 10/01/2009
but it's never 2009/10/1