Raised This Month: $85 Target: $400

[INC] Time Parser

Post New Thread Reply   
Thread Tools Display Modes
Author Message
Join Date: Dec 2017
Location: Argentina
Old 10-07-2020 , 23:10   [INC] Time Parser
Reply With Quote #1

I created this include having in mind situations where more friendly time inputs could come handier than specifying everything in minutes when we're talking about, let's say, ban times.
Instead of the user thinking how many minutes a day, a week, 2 hours or 3 months could be, this parser would solve this issue in a very elegant and practical way.

It takes inputs in the form of 3d (3 days), 4w2h (4 weeks and 2 hours), or even 1y1y120d and will sum up to the proper 2 years and 120 days.

The functions returns the UNIX timestamp of the date as result that comes from the sum of all time unit inputs.

If any questions, criticism or feedback (which is always appreciated) let me know down below. Thanks!

Include and Test Plugin Sources on GitHub!

Last edited by ratawar; 10-12-2020 at 00:48.
ratawar is offline

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

Forum Jump

All times are GMT -4. The time now is 14:58.

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