|
PowerBASIC Forums
![]() PowerBASIC for Windows
![]() Week of Day ? (Page 2)
|
This topic is 3 pages long: 1 2 3 |
next newest topic | next oldest topic |
| Author | Topic: Week of Day ? |
|
Egbert Zijlema Member |
Matthias, Wilkommen! I mean, you're welcome to use my code, but as soon as you're going to write code for the international market, you may feel the need for a routine that covers the 3 possibilities as mentioned here before. ------------------ IP: Logged |
|
Egbert Zijlema Member |
Done, folks! My Gregorian functions now include a week number routine that takes Windows settings in account. You may download it here: http://www.egbertzijlema.nl/files/gregorian.zip . Finally, I have a question for programmers in Belgium, France, Spain and the UK: is it correct that in your country the week containing January 1 is considered to be week 1? This is what Windows returns, but it is not in accordance with ISO-rules, which should be mandatory in the European Union. ------------------ IP: Logged |
|
Michael Mattias Member |
>It's in the registry. See: HKEY_CURRENT_USER\Control Panel\International Mine just has a key=Locale, value '00000409' I guess the installed locale has these settings 'built in' so you just have to deal with it. Oh well, I guess that's why programming languages exist.. so some ambitious programmer could create a function like...
.. or something like that. Good to know, though. MCM IP: Logged |
|
Egbert Zijlema Member |
Michael, I wonder, do you have W98? Maybe in that case you'll find those settings in WIN.INI. ------------------ IP: Logged |
|
Michael Mattias Member |
Well, yes I am on Win/98 Maybe it's one of these from Win.ini...
Not really important, but I think I'll check our your stuff anyway. from description, you just might be that 'ambitious programmer' mentioned earlier... IP: Logged |
|
Michael Mattias Member |
Great start..
Since we can't post ZIP files in source code forum, might I suggest this (shamelessly copied from the "files" section of this web site)..... "Got a file to contribute? [This message has been edited by Michael Mattias (edited January 04, 2006).] IP: Logged |
|
Egbert Zijlema Member |
Michael, I do not quite understand what you mean. I've shared several files with PB. They're available from their Download section. ------------------ IP: Logged |
|
John Schexnaydre Member |
To make the Ver 8 complier happy, I needed to change this line in GREGORIAN.INC: IF ISFALSE(GetDateFormat iLocale, dwShortLong, lpDate, "", szDate, SIZEOF(szDate)) THEN To: IF ISFALSE(GetDateFormat( iLocale, dwShortLong, lpDate, "", szDate, SIZEOF(szDate))) THEN ------------------ IP: Logged |
|
Egbert Zijlema Member |
Thank you John, Corrected! Version 7.04 obviously accepts this syntax error. ------------------ IP: Logged |
|
Michael Mattias Member |
quote: For downloading? No difference. But finding it when you need it is another matter. IP: Logged |
|
Egbert Zijlema Member |
Thank you very much, Michael Mattias. I've, indeed, made the iLocale-param OPTIONAL BYVAL now (in every function where it is passed). So, if it is omitted, the function defaults to 0, which happens to be the value of %LOCALE_USER_DEFAULT. Furthermore I've optimized the Function GregDateFormat a little. So grab the latest version from: http://www.egbertzijlema.nl/files/gregorian.zip I'm still waiting for an intelligent answer from a Belgian, French, Spanish or British chap. Greetings,
[This message has been edited by Egbert Zijlema (edited January 05, 2006).] IP: Logged |
|
Michael Mattias Member |
>I've, indeed, made the iLocale-param OPTIONAL OPTIONAL parameters (especially since the compiler started supporting them without all the CDECL and square brackets crap) are a really, really nice feature, especially for doing 'backward compatible' upgrades. IP: Logged |
|
Egbert Zijlema Member |
Just to inform you: new article and new code at http://www.egbertzijlema.nl/programming.html ------------------ IP: Logged |
|
Henning Wallgren Member |
Did anybody download Egbert's code (zip-file)? Just went to his website and it's down so no way to get hold of the code. Yes, submitting the code to pb would have been a good idea.. However, I looked there and it doesn't seem like much have been uploaded there in years anyways? If you have Egbert's latest code, will you please email it to me: HENNING at DIARY dut ST Thx, ------------------ IP: Logged |
|
Egbert Zijlema Member |
Henning, The site mentioned here is down. Webhosting is too expensive for me, being just an amateur. ------------------ IP: Logged |
This topic is 3 pages long: 1 2 3 All times are EasternTime (US) | next newest topic | next oldest topic |
![]() |
|
Copyright © 1999-2007 PowerBASIC, Inc. All Rights Reserved.