Checking for a valid date

  • Thread starter Thread starter Armin Zingler
  • Start date Start date
Jason Pettys said:
I don't understand your question.

Just like I didn't understand yours.
As I said in my first reply to
the OP: "It probably wouldn't matter much on a Win Forms app, but I
would really back away from this on ASP.NET if you're expecting any
volume of traffic."

I didn't know the client machine is not able to check this. Such a lot of
resources wasted!
In the latter case I would anticipate that a lot of unnecessary
exceptions would cause a noticeable performance penalty. In the
former case I think one could get by with a Try/Catch. I guess my
point was that there are cases where optimization should be a
concern even when the only validation is of user-entered data, and
one should be aware of both sides when picking how to validate
dates.

Don't you agree that a developer should be aware that in some cases
the exception-based approach can be a performance problem?

I do agree. What I explained in my previous post: If you want to use
date.parse, you must use try/catch for the reasons given. By saying "use
date.parse" I mean "permit the format(s) that date.parse permits". If you
don't use date.parse, it's up to you, of course.

Armin
 
Jason,

I find it a much larger problem that I cannot find how to get the
language/culture setting the client is using on the serverside.

Therefore I have probably only seen on a webpage three textboxes with day,
month, year while that is than checked using javascript. That gives as extra
(not that important) few traffic.

However if you have a very good method to get the language/culture setting
from the client on server side, than I will be much obliged.

Just my thought,

Cor
 
Cor,

an OT question: do you see my reply to Jason from today, 02:03 AM? When I
posted the message (and two other messages), it appeared in my OE as a new
message, but when I clicked on it, it was thriked through as if it has been
deleted from the server (and I did not delete it). As written above, this
happens to another message, but I did get a reply to it, so I think it must
have been on the server. It was a message in the thread "How to compare
objects using their typecode". I can see only one answer from me from 22:29
yesterday, but not the one from today, 02:46. Do you see still it?

Thx a lot, Cor, if you could have a look, and sorry ppl for asking here!

Armin

P.S: I also have the problem that I am told about 6 new messages in this
group (since Sunday) but when I try to download them they don't seem to
exist - then they are back again...and gone...there...gone... :( Maybe I
should reset my news reader.
 
Cor,

Stooop! I reset the group in the news reader and eveything seems to be fine
now. Sorry for wasting your time (if you already did ;-) )! (I should have
done this before...)

Armin
 
Armin,

I was starting to hanlde it, glad you messaged this (what I would expect
from you)

I don't know how fast at the moment your connection is. However some months
they had not set the retention time. The newsgroups where growing and
growing.

You understand probably what this means for dial up users.

Now it is luckily 2 months again.

Cor
 
Cor Ligthert said:
I was starting to hanlde it, glad you messaged this (what I would
expect from you)

I don't know how fast at the moment your connection is. However some
months they had not set the retention time. The newsgroups where
growing and growing.

You understand probably what this means for dial up users.

Now it is luckily 2 months again.


As I still have the problem that there are 7 new posts that disappear as
quickly as they appeared, I activated NNTP logging. From the log file I see
that there seems to be something going on on the server. Very short example
(lines received from the news server):

13:39:30 [rx] 211 9083 276748 285823 microsoft.public.dotnet.languages.vb
13:42:15 [rx] 211 29394 1 285825 microsoft.public.dotnet.languages.vb

The 3 numbers after 211 are:
9083 = approximate number of posts in the group
276748 = number of first article
285823 = number of last article

As you see in the second line (only 3 mins later) the numbers changed
totally. This happens almost each time the group is accessed. Well, let's
wait till this stops.


I write this here because others might also have problems with this group
(not with the ppl but the download ;)

Armin
 
Armin,

Your message as reply to Jason I see in my newsreader.
I replied it as well with a complete different text, because I find it a
long time a problem that I cannot get the used culture/language on the
client computer when he is using IE, and maybe Jason has an answer for that.

This is a part of your message
I don't understand your question.
Just like I didn't understand yours.


You know that Google is great now with these newsgroup.
This is this thread
http://groups-beta.google.com/group...17efaa3403f/d88e2533ae754cae#d88e2533ae754cae

This is the address to it
http://groups-beta.google.com/group/microsoft.public.dotnet.languages.vb?hl=en&lr=&ie=UTF-8

Cor
 
Armin Zingler said:
P.S: I also have the problem that I am told about 6 new messages in this
group (since Sunday) but when I try to download them they don't seem to
exist - then they are back again...and gone...there...gone...

The same here...
 
The easiest way is to use the DateTime Picker for user input to ensure he
inputs a valid date.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top