Jump to content

Recommended Posts

Posted (edited)

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
;==============================================================

Download:

Date.au3

Example:

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

Reference:

http://ca3.php.net/date

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
Posted

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.

  • 2 weeks later...
Posted (edited)

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

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...