[Plugin] strftime
#1

strftime
Well, I'm starting in c + + plugin that I made this little function based on C + + strftime

Why is it called strftime?
This means that you give the format you want at the time, this has a similar use ah
pawn Код:
format
What makes this plugin is to get the server time in different ways, 12-hour format | am, pm | itself in many ways as you want to get it.

EDIT: If the especifier does not exist crash the server!!

Examples:

Example #1
pawn Код:
#include <strftime>
public OnFilterScriptInit()
{
       new time[20];
       strftime("%I:%M %p",time);
       print(time);
       return 1;
}
Console
Код:
10:05 PM
Example #2
pawn Код:
#include <strftime>
public OnFilterScriptInit()
{
       new time[20];
       strftime("%I:%M:%S %p",time);
       print(tiempo);
       return 1;
}
Console
Код:
10:05:43 PM
Example #3
pawn Код:
#include <strftime>
public OnFilterScriptInit()
{
       new time[20];
       strftime("%p",time);
       print(time);
       return 1;
}
Console
Код:
PM
Especifiers
Код:
%a - Abbreviated weekday name 
%A - Full weekday name 
%b - Abbreviated month name  
%B - Full month name  
%c - Date and time representation  
%d - Day of the month (01-31)  
%H - Hour in 24h format (00-23) 
%I - Hour in 12h format (01-12)  
%j - Day of the year (001-366)  
%m - Month as a decimal number (01-12)  
%M - Minute (00-59)  
%p - AM or PM designation  
%S - Second (00-61)  
%U - Week number with the first Sunday as the first day of week one (00-53)  
%w - Weekday as a decimal number with Sunday as 0 (0-6) 
%W - Week number with the first Monday as the first day of week one (00-53)  
%x - Date representation  
%X - Time representation  
%y - Year, last two digits (00-99)  
%Y - Year  
%Z - Timezone name or abbreviation  
%% - A % sign
Download:Windows dll + Linux so+ source

Thanks to CyNiC for compile the plugin to linux version

Credits: Josta ( Create the plugin)
Credits: the_chaoz ( helpme whit c++)

Note: Sorry for my bad English, use a translator
Reply


Messages In This Thread
strftime - by Jovanny - 09.10.2011, 05:07
Re: strftime - by Kar - 09.10.2011, 05:10
Re: strftime - by HyperZ - 09.10.2011, 05:56
Respuesta: Re: strftime - by Jovanny - 09.10.2011, 05:59
Re: strftime - by [L3th4l] - 09.10.2011, 06:00
Re: strftime - by Flake. - 09.10.2011, 06:41
Respuesta: Re: strftime - by Jovanny - 09.10.2011, 06:55
Re: strftime - by Zh3r0 - 09.10.2011, 07:48
Re: strftime - by thiaZ_ - 09.10.2011, 08:15
Re: strftime - by GangsTa_ - 09.10.2011, 08:17
Re: strftime - by wups - 09.10.2011, 08:44
Re: strftime - by AndreT - 09.10.2011, 09:14
Re: strftime - by TheArcher - 09.10.2011, 09:38
Re: strftime - by CyNiC - 09.10.2011, 13:41
Respuesta: Re: strftime - by Jovanny - 09.10.2011, 18:58
Re : strftime - by Naruto_Emilio - 09.10.2011, 21:58
Respuesta: Re: strftime - by Jovanny - 10.10.2011, 03:18
AW: strftime - by olaf137 - 10.10.2011, 07:14
Respuesta: strftime - by Jovanny - 11.10.2011, 04:50
Re: strftime - by Ballu Miaa - 10.09.2012, 18:21
Re: strftime - by Kaperstone - 10.09.2012, 18:47
Respuesta: Re: strftime - by CaptainMactavish - 10.09.2012, 23:43
Re: strftime - by Stronach - 27.09.2012, 20:35

Forum Jump:


Users browsing this thread: 1 Guest(s)