Russian long date format

Please post all questions and comments regarding Help & Manual 7 here.

Moderators: Alexander Halser, Tim Green

rodrikwade
Posts: 14
Joined: Sat May 05, 2018 5:41 pm

Russian long date format

Unread post by rodrikwade »

Hi

When I use either <%DATELONG%> or <%NOW(d MMMM yyyy 'г.')%> in a project set to use Russian in the Language Settings, the result is the following:

15 Май 2018 г.

This incorrectly uses the infinitive form of the month. The correct form should, apparently, be the genitive:

‎15 ‎мая ‎2018 ‎г.

Is there any workaround?

Regards

Rodrik
User avatar
Tim Green
Site Admin
Posts: 23155
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Russian long date format

Unread post by Tim Green »

Hi Rodrik,

What is your Windows language and system locale set to? The date strings get their formats and content from the Windows settings, so if Russian in Windows does it right you should be getting the right result. If your system is set to Russian and it's still wrong the error is in Windows... :?
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
rodrikwade
Posts: 14
Joined: Sat May 05, 2018 5:41 pm

Re: Russian long date format

Unread post by rodrikwade »

Hi Tim

I've set the Windows language to Russian (it's not my usual setting) and the location to Russia. Windows correctly displays the long date as ‎15 ‎мая ‎2018 ‎г. This is also reflected in Word if I insert a document property with the appropriate long date format: d MMMM yyyy 'г.'

However, the output from H&M remains: 15 Май 2018 г.

Regards

Rodrik
User avatar
Alexander Halser
EC-Software Support
Posts: 4098
Joined: Mon Jun 24, 2002 7:24 pm
Location: Salzburg, Austria
Contact:

Re: Russian long date format

Unread post by Alexander Halser »

Hi Rodrik,

What value do you get for the variable <%MONTHNAME%> ?
<%MONTHNAME%> equals to the format string <%NOW(mmmm)%> (note the lowercase "mmmm").

Help+Manual uses a Windows function to retrieve the date string. It displays whatever Windows delivers for a given format string. To get the date and time format for a given language correctly, Help+Manual calls the Windows function with a LocaleID, wich is derived from the project language. For Russian, make sure that your help project defines "Russian" as the project language in the configuration section.
Alexander Halser
Senior Software Architect, EC Software GmbH
User avatar
Alexander Halser
EC-Software Support
Posts: 4098
Joined: Mon Jun 24, 2002 7:24 pm
Location: Salzburg, Austria
Contact:

Re: Russian long date format

Unread post by Alexander Halser »

Hm... seems indeed to be an issue of the Windows API call used:
https://msdn.microsoft.com/en-us/librar ... s.85).aspx
Alexander Halser
Senior Software Architect, EC Software GmbH
User avatar
Alexander Halser
EC-Software Support
Posts: 4098
Joined: Mon Jun 24, 2002 7:24 pm
Location: Salzburg, Austria
Contact:

Re: Russian long date format

Unread post by Alexander Halser »

Ok. Please use the variable <%DATELONG%> instead of the formatting variable <%NOW(xxx)%>.

<%DATELONG%> will still return month names in the nominative form, but we are going to change that in the next update, so that it retrieves the genitive form of the long month name.
Alexander Halser
Senior Software Architect, EC Software GmbH
rodrikwade
Posts: 14
Joined: Sat May 05, 2018 5:41 pm

Re: Russian long date format

Unread post by rodrikwade »

Thank you for your response, Alexander.

I look forward to the update.

Rodrik
User avatar
Alexander Halser
EC-Software Support
Posts: 4098
Joined: Mon Jun 24, 2002 7:24 pm
Location: Salzburg, Austria
Contact:

Re: Russian long date format

Unread post by Alexander Halser »

Hi Rodrik,

You can download the latest beta build 4482 from this link:
https://www.helpandmanual.com/download/ ... p-v736.exe

It is a stable beta and already includes the new date variables:

<%DATELONG%> returns the current date with long month names (change: now in genitive form).

<%DATE(d MMMM yyyy 'г.')%> is a new formatting variable to retrieve the date by using a formatting string. It returns the date only, without a time. Windows delivers the genitive form only for explicit date calls, the generic calls for a DateTime return month names in the nominative form. This variable is yet not documented, but works exactly like <%NOW(xx)%>, minus the time formatting options.

To sum it up:

<%NOW(d MMMM yyyy 'г.')%> returns "‎16 Май ‎2018 ‎г"
<%DATE(d MMMM yyyy 'г.')%> returns "‎16 ‎мая ‎2018 ‎г"
<%DATELONG%> returns "‎16 ‎мая ‎2018"
<%DATE%> returns "‎16 05 ‎2018" (this remains unchanged)
Alexander Halser
Senior Software Architect, EC Software GmbH
Ilya Zhukov
Posts: 4
Joined: Mon Jul 20, 2009 8:43 am
Location: Moscow, Russia
Contact:

Re: Russian long date format

Unread post by Ilya Zhukov »

Hi, everybody!
Trying to get a Russian date in long format in genitive form, I have just:
1) Downloaded H+M 7.3.6. build 4521 and installed it over the previous version.
2) Checked Windows language, location and format – all are set to Russian / Russia (it is Win7 64 sp1).
3) Checked project language settings: Russian language and RUSSIAN_CHARSET.
4) Added the following variables to a topic: <%DATE(d MMMM yyyy 'г.')%> and <%DATELONG%>.
5) Published the project to CHM.
As a result I could not get the month name in genitive form (nominative, see attached screenshot). I also tried to install the above build on my other PC with clean Windows 10, created a new Russian language project, but the output was also nominative. Is there anything else to check or change in Windows or H&M settings?
You do not have the required permissions to view the files attached to this post.
User avatar
Alexander Halser
EC-Software Support
Posts: 4098
Joined: Mon Jun 24, 2002 7:24 pm
Location: Salzburg, Austria
Contact:

Re: Russian long date format

Unread post by Alexander Halser »

Hello Ilya,

We confirm the problem, though it's not clear to me, why the two functions stopped working. Both had been tested and verified. Actually, this date function internally returns an error and that's why the standard date function takes over - without month names in genitive form.

Please use build 4531 instead, download from
https://www.helpandmanual.com/download/ ... p-v740.exe
Alexander Halser
Senior Software Architect, EC Software GmbH
Ilya Zhukov
Posts: 4
Joined: Mon Jul 20, 2009 8:43 am
Location: Moscow, Russia
Contact:

Re: Russian long date format

Unread post by Ilya Zhukov »

Alexander,
thank you for your response!
v740 works great!
rodrikwade
Posts: 14
Joined: Sat May 05, 2018 5:41 pm

Re: Russian long date format

Unread post by rodrikwade »

Hi Alexander

The functionality doesn't seem to be working in7.4.0 build 4603.

These are my results:

DATELONG: 15 Ноябрь 2018 г.
DATE(d MMMM yyyy г.): 15 Ноябрь 2018 г.
NOW(d MMMM yyyy г.): 15 Ноябрь 2018 г.

I'm informed that "Ноябрь" is the incorrect case.

Regards

Rodrik
User avatar
Alexander Halser
EC-Software Support
Posts: 4098
Joined: Mon Jun 24, 2002 7:24 pm
Location: Salzburg, Austria
Contact:

Re: Russian long date format

Unread post by Alexander Halser »

Could any Russian native speaker please comment on this? We don't speak Russian, we can just rely on the Windows API...
Alexander Halser
Senior Software Architect, EC Software GmbH
Sergey Selyuto
Posts: 4
Joined: Tue Jul 10, 2018 10:26 am
Location: Russia, Moscow

Re: Russian long date format

Unread post by Sergey Selyuto »

Hi Alexander,

I am a Russian native speaker.

I confirm that this bug has reappeared in H&M. I am using 7.4.0 (4600).

I tested it mysef back in August (this is the version I used for testing) after you have fixed the issue and H&M returned a correct Russian long date in the genitive form for <%DATELONG%>.

It seems like this bug for some reasons crept in back to the code and H&M again returns the nominative form (which is incorrect) for <%DATELONG%>.

These are my results:
DATELONG: 19 Ноябрь 2018
DATE(d MMMM yyyy г.): 19 Ноябрь 2018 г.
NOW(d MMMM yyyy г.): 19 Ноябрь 2018 г.

The way it should work:
DATELONG: 19 ноября 2018
DATE(d MMMM yyyy г.): 19 ноября 2018 г.
NOW(d MMMM yyyy г.): 19 ноября 2018 г.
User avatar
Alexander Halser
EC-Software Support
Posts: 4098
Joined: Mon Jun 24, 2002 7:24 pm
Location: Salzburg, Austria
Contact:

Re: Russian long date format

Unread post by Alexander Halser »

Just to keep you up-to-date, we are working on this issue.
Alexander Halser
Senior Software Architect, EC Software GmbH
Post Reply