Welcome to Geeklog, Anonymous Saturday, March 15 2025 @ 10:50 pm EDT
Geeklog Forums
Local date
Status: offline
broelling
Forum User
Junior
Registered: 04/30/02
Posts: 23
I'm using the visitorstats block by Mr.GxBlock, and I'm very pleased with it.
However - I can't seem to get it to understand that it should be looking for my locale (Denmark), before it publishes any long month or days names. How can I get it to use the config.php variables for days and months instead of this, so it knows it's in Denmark!??
Code in the phpblock_newstats() function:
$dayofweek=date("l"
;
$month=date("F"
;
$day=date("d"
;
$year=date("Y"
;
$hour=date("H"
;
I'd rather be good than clever - I'd rather have all facts wrong, than no reply whatever...





I'd rather be good than clever - I'd rather have all facts wrong, than no reply whatever...
16
19
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
To quote from the PHP manual for date:
To format dates in other languages, you should use the setlocale() and strftime() functions.
In other words: You have to replace those date() calls with the corresponding calls to strftime() (Geeklog already calls setlocale() for you).
bye, Dirk
16
13
Quote
Status: offline
broelling
Forum User
Junior
Registered: 04/30/02
Posts: 23
Thanx...
Thinking about it, I guess I knew that - but my brain must be on standby since new years eve...---I'd rather be good than clever - I'd rather have all facts wrong, than no reply whatever...
I'd rather be good than clever - I'd rather have all facts wrong, than no reply whatever...
I'd rather be good than clever - I'd rather have all facts wrong, than no reply whatever...
13
13
Quote
All times are EDT. The time is now 10:50 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content