Raised This Month: $ Target: $400
 0% 

catch a day like MO, TU, ...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
wouter
Senior Member
Join Date: Feb 2005
Location: Belgium
Old 04-10-2006 , 12:56   catch a day like MO, TU, ...
Reply With Quote #1

how does that day returns? i use
Code:
new CurDay[16] get_time("%d",CurDay,15)

would it return: MO or monday?
wouter is offline
P34nut
AMX Mod X Beta Tester
Join Date: Feb 2006
Location: Netherlands
Old 04-10-2006 , 13:08  
Reply With Quote #2

that will return the day number: 10
__________________
All you need to change the world is one good lie and a river of blood
P34nut is offline
wouter
Senior Member
Join Date: Feb 2005
Location: Belgium
Old 04-10-2006 , 13:22  
Reply With Quote #3

Quote:
Originally Posted by P34nut
that will return the day number: 10
day number 10? *confused only 7 days*
can you explaine that?
wouter is offline
pope
Junior Member
Join Date: Nov 2005
Location: New York
Old 04-10-2006 , 13:35  
Reply With Quote #4

I believe he means it would return the current numeric day of the month, today being the 10th.

Try something like this for day name:

Code:
new CurDay[8]
get_time("%a",CurDay,7)
__________________
pope is offline
Send a message via AIM to pope Send a message via MSN to pope Send a message via Yahoo to pope
wouter
Senior Member
Join Date: Feb 2005
Location: Belgium
Old 04-10-2006 , 13:38  
Reply With Quote #5

ok
wouter is offline
wouter
Senior Member
Join Date: Feb 2005
Location: Belgium
Old 04-11-2006 , 07:27  
Reply With Quote #6

mhh yes it return the number of the day (11 in this case)
Code:
public day_print(id) {     new CurrentDay[3]     get_time("%d",CurrentDay,2)     client_print(0,3,"The current day is: %s",CurrentDay) }


but is it possible to return the name of the day?
like MO, TU or Monday, Tuesday?
wouter is offline
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 04-11-2006 , 07:56  
Reply With Quote #7

try what pope said %a or %A

Quote:
%a abbreviated weekday name (Sun)
%A full weekday name (Sunday)
%b abbreviated month name (Dec)
%B full month name (December)
%c date and time (Dec 2 06:55:15 1979)
%d day of the month (02)
%H hour of the 24-hour day (06)
%I hour of the 12-hour day (06)
%j day of the year, from 001 (335)
%m month of the year, from 01 (12)
%M minutes after the hour (55)
%p AM/PM indicator (AM)
%S seconds after the minute (15)
%U Sunday week of the year, from 00 (48)
%w day of the week, from 0 for Sunday (6)
%W Monday week of the year, from 00 (47)
%x date (Dec 2 1979)
%X time (06:55:15)
%y year of the century, from 00 (79)
%Y year (1979)
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
wouter
Senior Member
Join Date: Feb 2005
Location: Belgium
Old 04-11-2006 , 08:15  
Reply With Quote #8

oh i thought it was just a letter not a "flag" (so would be the same as "%d")


srry for not trying your advise pope
wouter is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:42.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode