Home » U++ Library support » CalendarCtrl » StrToDate(Date& d, const char *s, Date def)
Re: StrToDate(Date& d, const char *s, Date def) [message #24290 is a reply to message #24289] |
Fri, 08 January 2010 22:38 |
|
koldo
Messages: 3361 Registered: August 2008
|
Senior Veteran |
|
|
Hello sapiency
Quote: | this function works nice for a lot of situations, but IMHO it make things it not should do ..
1.1.10 -> 01.01.2010 is OK
1.1.1 -> 01.01.2001 is not OK
I modified it and now it should work as I expect:
1.1.10 -> 01.01.2010
1.1.0 -> 01.01. 0
1.1.1 -> 01.01. 1
1.1.01 -> 01.01.2001
1.1.011-> 01.01. 11
|
Well, for me
1.1.1 -> 01.01.2001 is OK
1.1.1 -> 01.01. 1 is not OK
1.1.0 -> 01.01.0 sound logical, but strange
1.1.10 -> 01.01.2010 is OK and does not match with the later... it should have to be
1.1.10 -> 01.01.10, that sound logical, but strange
Perhaps if you are working in something about Roman Empire it sounds clever, but for events happened nowadays, it is not simple to understand.
So I prefer the actual implementation . Sorry !
Best regards
Koldo
Best regards
IƱaki
[Updated on: Fri, 08 January 2010 22:39] Report message to a moderator
|
|
|
|
|
StrToDate(Date& d, const char *s, Date def)
By: sapiency on Thu, 07 January 2010 19:32
|
|
|
Re: StrToDate(Date& d, const char *s, Date def)
By: mirek on Fri, 08 January 2010 17:40
|
|
|
Re: StrToDate(Date& d, const char *s, Date def)
By: sapiency on Fri, 08 January 2010 22:14
|
|
|
Re: StrToDate(Date& d, const char *s, Date def)
By: koldo on Fri, 08 January 2010 22:38
|
Goto Forum:
Current Time: Thu May 16 06:35:12 CEST 2024
Total time taken to generate the page: 0.01799 seconds
|