SA-MP Forums Archive
[Include] Date/Time Utils - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] Date/Time Utils (/showthread.php?tid=626397)



Date/Time Utils - BiosMarcel - 14.01.2017

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 код:
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


Re: Date/Time Utils - Ivan_Ino - 14.01.2017

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

rep+


Re: Date/Time Utils - BiosMarcel - 14.01.2017

Quote:
Originally Posted by Ivan_Ino
Посмотреть сообщение
Interesting, but use Uppercase first letter in functions, this is not java ppp

rep+
Ehhh, ok ...


Re: Date/Time Utils - Pearson - 15.01.2017

Nice One.


Re: Date/Time Utils - BiosMarcel - 15.01.2017

Quote:
Originally Posted by Pearson
Посмотреть сообщение
-REP . COPY/PASTE
Nice one


Re: Date/Time Utils - SyS - 15.01.2017

It's nice I like it


Re: Date/Time Utils - BiosMarcel - 15.01.2017

Quote:
Originally Posted by Sreyas
Посмотреть сообщение
It's nice I like it
Thanks