Jump to content
Sign in to follow this  

PHP Date Replica

Recommended Posts


I much liked PHP's date function so I decided to make it for Autoit.

;Function Name:        Date($Format, [$Timestamp=0])
;Description:        Parses your format and returns a date
;Parameters:        $Format        - A string you want formatted
;                    $Timestamp    - A value from _NowCalc ()
;                    Example: 2008/05/05 09:53:53
;Return Values:        Returns a formatted string
;Reference:            This is a replica of PHP date (); function
;                    Use http://ca3.php.net/date for formatted




Date('F j, Y, g:i a') // March 10, 2001, 5:16 pm



Some formats I didn't include due to the fact the information isn't enough.

B - u - e - I - O - P - T - Z - c - r - U

Edited by McGod

Share this post

Link to post
Share on other sites

Just a tip when creating UDF's. Its bad practice for your functions to rely upon other UDF's. This one relies upon both Array.au3 and Date.au3.

Share this post

Link to post
Share on other sites

Nice, I made a simular function but with less options so i'll be using yours from now on.

great job and thanks for sharing :)

Edited by Robjong

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.