EllisLab text mark
Advanced Search
     
Date Plugin
Posted: 25 April 2011 03:53 PM
Avatar
Joined: 2008-12-22
217 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
http://php.net/manual/en/function.strftime.php

    
{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.

 Signature 

Vim Interactive • Baltimore Based ExpressionEngine Development

 
Posted: 25 April 2011 05:12 PM   [ # 1 ]   [ Rating: 0 ]
Avatar
Joined: 2004-05-14
20504 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!

 
Posted: 15 July 2011 09:40 AM   [ # 2 ]   [ Rating: 0 ]
Joined: 2010-03-25
32 posts

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

 
Posted: 15 July 2011 10:09 AM   [ # 3 ]   [ Rating: 0 ]
Avatar
Joined: 2008-12-22
217 posts

adisys,

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

 Signature 

Vim Interactive • Baltimore Based ExpressionEngine Development

 
Posted: 15 July 2011 10:54 AM   [ # 4 ]   [ Rating: 0 ]
Joined: 2010-03-25
32 posts

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

 
Posted: 15 July 2011 11:11 AM   [ # 5 ]   [ Rating: 0 ]
Avatar
Joined: 2008-12-22
217 posts

adisys,

We will take a look at this later today.

One question, what type of variable is pts_start_date?

 Signature 

Vim Interactive • Baltimore Based ExpressionEngine Development

 
Posted: 15 July 2011 11:12 AM   [ # 6 ]   [ Rating: 0 ]
Joined: 2010-03-25
32 posts

It is a Date field.
Thank you.