I'm wondering if there's a function someone would be nice enough to share that would convert a string containing a date/time into BYOND time (1/10th of seconds since 1/1/00)
Similar to http://php.net/strtotime though I'd expect it'd have a more restrictive set of allowed parameters.
Maybe there's a simple way to do this that I'm overlooking?
ID:156966
Jun 22 2010, 4:21 pm
|
|
Jun 22 2010, 7:51 pm
|
|
Maybe you could make something in PHP to do it for you, upload parameters. And have it export back to your server.
|
In response to Leur
|
|
I considered that, but it'd be nice if there was a less hacksy method to do something relatively simple.
I think I will have to resort to it though, 'cause there seems to be no easy DM method to use. |
In response to Murrawhip
|
|
You could try suggesting it. They may add it if there isn't already a way to do this, and it is helpful to people.
|
In response to Leur
|
|
I made that a while ago. Maybe it'll help.
convertTime(n as num) #Edit you also need my floor proc... floor(A,B=1) |
In response to Tubutas
|
|
I believe he is asking is it possible to create a timestamp from providing some information about which date he specified since the example on php's website is...(below), which in this case would be no.
if (($timestamp = strtotime($str))
|
In response to Leur
|
|
I guess I was just determining whether or not there was already a way to do this- not wanting to add a low quality post to the Request a Feature page.
I 'spose I'll request it and see how it goes. ---- EDIT Well- it's posted: http://www.byond.com/members/ DreamMakers?command=view_tracker_issue&tracker_issue=1619 I'm still hoping for an easier solution though :D |
In response to Tubutas
|
|
No idea what you're doing with that floor proc. A more straightforward one is:
#define ceil(X,Y) -round(-(X)-(Y)/2,(Y)) |