ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Date Plugin

April 25, 2011 3:53pm

Subscribe [3]
  • #1 / Apr 25, 2011 3:53pm

    LMO's avatar

    LMO

    203 posts

    Hello All,

    We have a new date plugin in beta here for all to use and test. This plugin contains some date functions to add or subtract days, months and/or years to the current date or a preset date. You can also change the format of how the date will be returned.

    Download Link: http://viminteractive.com/ee_addons/dt_v0.1.zip

    Here is the writeup and code examples below:

    =============================
        The Tag
        =============================
    
        {exp:dt}
    
            // Will return the date formatted this way: MM/DD/YYYY
    
        ==============
        TAG PARAMETERS
        ==============
    
        set=[optional]
               Sets the static date that the other parameters will reference. If not set will default to the current date.
    
        {exp:dt set="01/01/2010"} 
    
            // 01/01/2010
    
        =============================
    
        format=[optional]
               Sets the format of the returned date using the following parameters: <a href="http://php.net/manual/en/function.strftime.php">http://php.net/manual/en/function.strftime.php</a>
    
        {exp:dt format="%A %b %e, %Y"} 
    
            // Saturday Nov 3, 1990 
    
        =============================
    
        day=[optional]
            Adds or subtracts a value in days to current/set date.
    
        month=[optional]
             Adds or subtracts a value in months to current/set date.
    
        year=[optional]
             Adds or subtracts a value in years to current/set date.
    
        {exp:dt day="3" month="1" year="-1" set="1/1/2010"}
            //    02/04/09

    Please reply with any bugs, questions or comments.

  • #2 / Apr 25, 2011 5:12pm

    Lisa Wess's avatar

    Lisa Wess

    20502 posts

    Howdy,

    I’ve moved this up to Community News and removed the actual attachment as per our Community News Guidelines.  Please do update this thread with the link to where you choose to host the add-on.

    Thank you!

  • #3 / Jul 15, 2011 9:40am

    adisys

    23 posts

    Where actually did you move this thread? I can not seem to find it.

  • #4 / Jul 15, 2011 10:09am

    LMO's avatar

    LMO

    203 posts

    adisys,

    You can find it here now: http://devot-ee.com/add-ons/dt-plugin/

  • #5 / Jul 15, 2011 10:54am

    adisys

    23 posts

    Hi, thanks. Have you had a chance to look over the email I sent you?
    The one with the comparisons operator.

  • #6 / Jul 15, 2011 11:11am

    LMO's avatar

    LMO

    203 posts

    adisys,

    We will take a look at this later today.

    One question, what type of variable is pts_start_date?

  • #7 / Jul 15, 2011 11:12am

    adisys

    23 posts

    It is a Date field.
    Thank you.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases