Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "strtotime"
-
That moment that you come across a domain name which you thought would have definitely been taken already.
Came across strtoti.me. (php function for converting date/time strings into unix epoch's). Quickly wrote an api for it and put it online because fuck it, why not!
Feel free to use it as much as you want, I can't guarantee its availability unless it would become really popular but I can't imagine that.
URL: https://strtoti.me
API example: https://strtoti.me//... 20 20:15
API example (url encoded): https://strtoti.me//...
API documentation (not that good yet, might improve it..): https://strtoti.me
Well, let's see how this goes. Feedback appreciated but I currently have a shitload of projects to it doesn't have the highest priority right now!12 -
FUCK YOU PHP, WHY THE FUCK DO YOU GIVE ME DECEMBER 1ST WHEN I DO
strtotime('-1 month', '12/31/2015)
USING DateTime PRODUCES THE SAME FUCKING RESULT. ARE YOU FUCKING RETARDED OR WHAT?
YEAH I KNOW NOVEMBER DOESN'T HAVE 31ST BUT YOU COULD AT LEAST RETURN 30TH OR EVEN RAISE A WARNING, YOU FUCKING PIECE OF SHIT.10 -
<?php
define("NOW", date("Y-m-d H:i:s", time());
/* ..... more code ..... */
$nowUnix = strtotime(NOW);1 -
Second rant today....
Can the class explain the following query and why I started wishing the author might suffer pain even after death?
$date1 = strtotime($_REQUEST['year1'].'-'.$_REQUEST['month1'].'-01');
$date2 = strtotime($_REQUEST['year2'].'-'.$_REQUEST['month2'].'-31');
MONTH(FROM_UNIXTIME($date1)) >= MONTH(FROM_UNIXTIME(timestampColum))
AND
MONTH(FROM_UNIXTIME($date2)) <= MONTH(FROM_UNIXTIME(timestampColum))
But... The drugs the author must have taken to write this must be frigging awesome.10