Page 1 of 2

Suggestion: New string function

Posted: Sat Feb 01, 2014 10:18 pm
by hugo
Hello,

This one came as a new need:

New string function MonthToStr, MonthToStrPt and MonthToStrPtBr: receives a Date and returns the literal month.
Ex: MonthToStrPt(entity.datefield) => Fevereiro
Ex: MonthToStr(entity.datefield) => February

This is not a stopper, since we can simply workaround this with an expression or a pre-calculated field but would be nice to have.


Regards,
Hugo.

Re: Suggestion: New string function

Posted: Mon Feb 03, 2014 2:06 pm
by HighAley
Hello.

Please, send us translations of all months. Do you need an additional parameter which will allow to set case of first letter?

Thank you.

Re: Suggestion: New string function

Posted: Mon Feb 03, 2014 9:55 pm
by hugo
Month PT:
Janeiro
Fevereiro
Março
Abril
Maio
Junho
Julho
Agosto
Setembro
Outubro
Novembro
Dezembro

PT-BR:
janeiro
fevereiro
março
abril
maio
junho
julho
agosto
setembro
outubro
novembro
dezembro

An extra parameter to set case of the first letter would be nice, yes.

Re: Suggestion: New string function

Posted: Tue Feb 04, 2014 10:15 am
by HighAley
Hello.

Do you need case parameter to the PT language or it should work for PT-BR only?

Thank you.

Re: Suggestion: New string function

Posted: Tue Feb 04, 2014 3:14 pm
by hugo
This is the same of the day of week example:

The standard case for months for PT-PT is upper and for PT-BR is lower. It's the only difference.

However it's possible to have days of week in PT-PT text in lower-case (it's not so usual but it's also correct).
With PT-BR it's also possible to have upper if it's the start of a sentence.

I would say that PT-PT starts with upper by default and PT-BR with lower by default. An extra parameter will change the case of the default.
This extra parameter will be only an extra. It's not so important.

Another possibility would be to have only one function MonthToStrPt that returns months in PT-PT and one extra parameter to put in lower case. I think that this also can solve the problem with the minium effort.

Regards,
Hugo.

Re: Suggestion: New string function

Posted: Wed Feb 05, 2014 1:41 pm
by HighAley
Hello.

We have added next functions:

Code: Select all

MonthName(DataSource.DateColumn, Culture)
MonthName(DataSource.DateColumn, Culture, UpperCase)
Where culture could be "PT-PT" or "PT-BR" and third parameter is boolean.

Thank you.

Re: Suggestion: New string function

Posted: Wed Feb 05, 2014 4:16 pm
by hugo
Thank you.
This function will contribute to make my model layer simpler.

Re: Suggestion: New string function

Posted: Thu Feb 06, 2014 5:24 am
by HighAley
Hello.

Good. Let us know if you need any additional help.

Thank you.

Re: Suggestion: New string function

Posted: Mon Feb 10, 2014 10:32 pm
by hugo
Hello,

The current public build still don't support this so I guess will be available latter, right ?


Thank you,
Hugo.

Re: Suggestion: New string function

Posted: Tue Feb 11, 2014 6:57 am
by HighAley
Hello.

Sorry, due to technical reasons we didn't include this function i our previous prerelease build. It will be available in our next build on February 14.

Thank you.