Lasso Soft Inc. > Home

[mf_datetime]

Linkmf_datetime
AuthorJason Huck
CategoryString
Version8.5.x
LicensePublic Domain
Posted07 Sep 2010
Updated07 Sep 2010
More by this author...

Description

Returns the given date in the datetime design pattern microformat. Will use an <abbr> tag unless -html5 equals true, in which case it will use a <time> tag.

Sample Usage

mf_datetime( -class='published', -html5=true);

// 

Source Code

Click the "Download" button below to retrieve a copy of this tag, including the complete documentation and sample usage shown on this page. Place the downloaded ".inc" file in your LassoStartup folder, restart Lasso, and you can begin using this tag immediately.

define_tag(
	'datetime',
	-namespace='mf_',
	-req='class',
	-opt='date', -type='date',
	-opt='format',
	-opt='id',
	-opt='html5', -type='boolean',
	-priority='replace',
	-encodenone,
	-description='Returns the given date in the datetime design pattern microformat.'
);
	!local_defined('date') ? local('date') = date;
	!local_defined('format') ? local('format') = '%d %b %Y';
	!local_defined('html5') ? local('html5') = false;
	
	local('out') = (#html5 ? '' | '');

	return(#out);
/define_tag;

Comments

No comments

Please log in to comment

Subscribe to the LassoTalk mail list

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft