Page Blocks

Hosting sponsored by:

Point In Space

 

API: Date

Filename:
fwpDate_mmShort4.ctag

Released With:
5.0.0

Current Version:
1.1.0

Status: Active

Min Lasso Tested: 8.1.0

Max Lasso Tested: 8.5.3

Related:

Still don't get it?

Check out the talk list archives, or join and ask your questions.

Documentation Error or Request?

Email documentation corrections or comments

API Reference

fwpDate_mmShort4 (Tag)

Description

Reformats a supplied Lasso date string to Jan 01 2005.

Syntax

[fwpDate_mmShort: dateString]

A dateString is a string data type that Lasso accepts as a legal format for a date.

Parameters & Member Tags

dateString (unnamed) = required : any valid Lasso date or date string

Examples

[fwpDate_mmShort: (field:'birthdate')]

[fwpDate_mmShort: $startDate]

Source Code

View in separate window

<?lassoscript
//............................................................................
//
//    pageblocks: (c) 2002-2007 http://www.pageblocks.org/
//
//............................................................................
/*

    {fileName=        fwpDate_mmShort4.ctag }
    {rsrcType=        tag }
    {rsrcName=        fwpDate_mmShort4 }
    {rsrcHTTP=        www.pageblocks.org/refc/fwpDate_mmShort4 }

    {lassoVrsnMin=    8.1.0 }
    {lassoVrsnMax=    8.5.3 }

    {author=        Greg Willits }
    {authorEmail=    subscribe to pbTalk at www.pageblocks.org/talk/ }
    {authorHTTP=    www.pageblocks.org }

    {desc=            Returns a date in Jan 01, 2003 format }

    {maintvsrn=        1.1 }
    {maintrelease=    5.1.7 }
    {maintdate=        2007-05-26 }
    {maintauthor=    Greg Willits }
    {maintnotes=    updated for changes to date handling introduced in 8.5.2
                    and generally cleaned up and simplified }

    {maintvsrn=        1.0 }
    {maintrelease=    5.0.0 }
    {maintdate=        2006-01-16 }
    {maintauthor=    Greg Willits }
    {maintnotes=    initial release }

*/
//.............................................................................

define_tag:'fwpDate_mmShort4',
    -priority = 'replace',
    -required = 'dateString', -copy;

    (#dateString != '') && (#dateString !>> '0000') && (valid_date: #dateString)
        ? return: (date_format: (date:#dateString), -format='%b %d, %Y');

/define_tag;
?>

© 2002-2010, pageblocks.org