SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Includes

Reply
 
Thread Tools Display Modes
Old 14/01/2017, 04:21 PM   #1
BiosMarcel
Banned
 
Join Date: Jul 2012
Location: Germany
Posts: 1,219
Reputation: 234
Default Date/Time Utils

Hey,

Recently, someone has asked for some ways to do stuff with dates and i was like:

Quote:
Originally Posted by Marcel
I am sure there is a library (include) to do this stuff.
Turned out there isn't (or maybe i was too dumb to find one), so i made one myself.


Important Notes:
15/01/2017
There have been a couple of bugs, because i didn't test everything properly, because of that i have now implemented a couple of Unit tests, please always use the latest version!


Information:

All functions work with integers, but in addition to that there is a function to convert a date string into integers and back.

Available Date Formats:

PHP Code:
YYYY_DD_MM
YYYY_MM_DD
DD_MM_YYYY
MM_DD_YYYY 
The separator to divide month, day and year from another is chooseable.

GitHub Page (Download)

Documentation (Unfinished)


Sorry, for not providing much documentation and information in this thread, use the GitHub Page instead.

Hope it is useful to at least some people. Also, everyone is welcome to improve / extend this library.


greetings Marcel

Last edited by BiosMarcel; 15/01/2017 at 01:23 PM.
BiosMarcel is offline   Reply With Quote
Old 14/01/2017, 04:26 PM   #2
Ivan_Ino
Big Clucker
 
Join Date: Oct 2012
Location: Croatia
Posts: 101
Reputation: 120
Default Re: Date/Time Utils

Interesting, but use Uppercase first letter in functions, this is not java ppp

rep+
Ivan_Ino is offline   Reply With Quote
Old 14/01/2017, 04:26 PM   #3
BiosMarcel
Banned
 
Join Date: Jul 2012
Location: Germany
Posts: 1,219
Reputation: 234
Default Re: Date/Time Utils

Quote:
Originally Posted by Ivan_Ino View Post
Interesting, but use Uppercase first letter in functions, this is not java ppp

rep+
Ehhh, ok ...
BiosMarcel is offline   Reply With Quote
Old 15/01/2017, 08:32 AM   #4
Pearson
Banned
 
Join Date: Jun 2015
Location: AUSTRALIA, SYDNEY
Posts: 282
Reputation: 30
Default Re: Date/Time Utils

Nice One.
Pearson is offline   Reply With Quote
Old 15/01/2017, 08:32 AM   #5
BiosMarcel
Banned
 
Join Date: Jul 2012
Location: Germany
Posts: 1,219
Reputation: 234
Default Re: Date/Time Utils

Quote:
Originally Posted by Pearson View Post
-REP . COPY/PASTE
Nice one
BiosMarcel is offline   Reply With Quote
Old 15/01/2017, 10:43 AM   #7
BiosMarcel
Banned
 
Join Date: Jul 2012
Location: Germany
Posts: 1,219
Reputation: 234
Default Re: Date/Time Utils

Quote:
Originally Posted by Sreyas View Post
It's nice I like it
Thanks
BiosMarcel is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[HELP] zero date and time Luca12 Scripting Help 1 01/10/2014 07:06 PM
how make date and time for last login time for user kinggta Scripting Help 3 17/06/2014 01:27 AM
[FilterScript] [FS] Time & Date 4#Future Filterscripts 69 05/08/2012 08:30 PM
Date & Time Mike Garber Help Archive 6 24/11/2009 06:10 PM


All times are GMT. The time now is 02:43 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.