Uppercase

  • Thread starter Thread starter shapper
  • Start date Start date
Hi,
if you mean you want to make this to some text displayed on a web page, you
can apply the following style attribute "text-transform:capitalize"

Regards,
Mohamed Mosalem
 
I don't want to use a CSS style.

I have a string in my VB.Net code which is taken from a DateTime
variable.

The problem is that the weekday in Asp.Net 2.0 when culture is pt-PT
comes with the first letter in lower case. This is wrong. I have no
idea why Microsoft didn't notice it.

So I have a string as folows: "domingo".
I want to change it to "Domingo".

Thanks,
Miguel
 
I don't want to use a CSS style.

Why not?
I have a string in my VB.Net code which is taken from a DateTime
variable.

The problem is that the weekday in Asp.Net 2.0 when culture is pt-PT
comes with the first letter in lower case. This is wrong. I have no
idea why Microsoft didn't notice it.

They did notice it - so much so, in fact, that they followed the standard
practice in Portuguese (and quite a few other European languages) of not
capitlising day names. We say "Sunday" in English, but in Spanish and
Portuguese they say "domingo" and in French they say "dimanche", not
"Dimanche".
So I have a string as folows: "domingo".
I want to change it to "Domingo".

So what's stopping you...?

Dim strDay As String = "domingo"
strDay = StrConv(strDay, VbStrConv.ProperCase)
 
Mark,

Yes, you are right.
In some European languages day names are not capitlised.
So in Portuguese, "Sunday" is "domingo".
But, in Portuguese, like in other european languages, there is also a
rule which says every first word of a phrase must be capitlised.
So when you have a date time format which is something like:
domingo, 20 de Janeiro de 2006 it should be Domingo, 20 de Janeiro de
2006.
It has nothing to do with the word.
It has to do with the position of the word in the phrase.

I will try your code now.

Thanks,
Miguel
 
In some European languages day names are not capitlised.
So in Portuguese, "Sunday" is "domingo".
But, in Portuguese, like in other european languages, there is also a
rule which says every first word of a phrase must be capitlised.

LOL! Well obviously, but that's the same for *every* word if it is the first
word in a sentence, not just days of the week. The difference is that the
*default* spelling of days of the week in Portuguese, like in most other
European languagues except English, is all lower-case. Same with months.
E.g. today in French we might say "Aujourd'hui nous sommes dimanche le 1er
octobre 2006" - neither the day nor the month would be capitalised.
 
Mark,

Yes, I know, but if there is a DateTime format that returns:
"sábado, 20 de Janeiro de 2006" *

Why not write "Sábado"?

The phrase I mentioned * is usually used alone such as in letters and
news not inside a text. Well, at least in that form and in most of the
times.

Anyway, this is just my opinion ... but i will just apply a upper case
to the week day.
No problem there. :-)

Thanks,
Miguel
 
Back
Top