Plugins:DateUtils
last edited by
lmajano
on 16-Apr-2010
|
Exploring the DateUtils Plugin
Overview
This CFC is a utility that helps you deal with date representations
parseRFC822
Parse RFC822 dates, returns empty string if not a valid date. (http://www.faqs.org/rfcs/rfc822.html)
Returns
- This function returns string
Arguments
| Key | Type | Required | Default | Description |
|---|---|---|---|---|
| datetime | string | Yes | --- | The datetime string to convert |
Examples
// parse an RFC822 date into a usable CF date time object safeCFDate = getPlugin("DateUtils").parseRFC822("Wed, 02 Oct 2002 08:00:00 EST");
parseISO8601
Parse a UTC or ISO8601 date to a normal CF datetime object: http://en.wikipedia.org/wiki/ISO_8601
YYYY-MM-DDThh:mm:ss
Returns
- This function returns string
Arguments
| Key | Type | Required | Default | Description |
|---|---|---|---|---|
| datetime | string | Yes | --- | The datetime string to convert |
Examples
// parse an iso8601 date into a usable CF date time object safeCFDate = getPlugin("DateUtils").parseISO8601("2003-04-01T13:01:02");

SideBar
User Login 




Comments (