Page Blocks

Hosting sponsored by:

Point In Space

 

API: Date

Filename:
fwpDate_euroSlash2.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_euroSlash2 (Tag)

Description

Reformats a supplied Lasso date string in the format of dd/mm/yy.

Syntax

[fwpDate_euroSlash2: 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_euroSlash2: (field:'eventStart')]

Source Code

View in separate window

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

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

    {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 dd/mm/yy 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_euroSlash2',
    -priority = 'replace',
    -required = 'dateString', -copy;

    (#dateString != '') && (#dateString !>> '0000') && (valid_date: #dateString)
        ? return: (date_format: #dateString, -format='%d/%m/%y');

/define_tag;
?>

© 2002-2010, pageblocks.org