Class Index | File Index

Classes


Function Namespace Pot.DateTime.format


Defined in: <pot.js>.

Function Namespace Summary
Constructor Attributes Constructor Name and Description
 
Pot.DateTime.format(format, (date))
Return the formatted date.
Field Summary
Field Attributes Field Name and Description
<static>  
Pot.DateTime.format.ATOM
A constant string of the date format for ATOM.
<static>  
Pot.DateTime.format.COOKIE
A constant string of the date format for COOKIE.
<static>  
Pot.DateTime.format.ISO8601
A constant string of the date format for ISO8601.
<static>  
Pot.DateTime.format.RFC1036
A constant string of the date format for RFC1036.
<static>  
Pot.DateTime.format.RFC1123
A constant string of the date format for RFC1123.
<static>  
Pot.DateTime.format.RFC2822
A constant string of the date format for RFC2822.
<static>  
Pot.DateTime.format.RFC3339
A constant string of the date format for RFC3339.
<static>  
Pot.DateTime.format.RFC822
A constant string of the date format for RFC822.
<static>  
Pot.DateTime.format.RFC850
A constant string of the date format for RFC850.
<static>  
Pot.DateTime.format.RSS
A constant string of the date format for RSS.
<static>  
Pot.DateTime.format.W3C
A constant string of the date format for W3C.
Function Namespace Detail
Pot.DateTime.format(format, (date))
Return the formatted date. That works the same as PHP's date function probably. (Refer the manual.)
  var result = Pot.DateTime.format('Y-m-d H:i:s');
  debug(result);
  // @results '2011-06-07 01:25:17'
  var result = Pot.DateTime.format('Y/m/d (J) H:i [\\o=o]');
  debug(result);
  // @results '2011/06/08 (水) 11:30 [o=水無月]'
  var result = Pot.DateTime.format(Pot.DateTime.format.RFC2822);
  debug(result);
  // @results 'Wed, 08 Jun 2011 02:34:21 +0900'
Parameters:
{String} format
A format string. (e.g. 'Y-m-d').
{Date|Number|*} (date)
(Optional) The specific timestamp.
Returns:
{String} Return the formatted date string.
See:
http://php.net/function.date Use a backslash '\\' if escape the next character.
------------------------------------------------
Extended formats:
  - J : Japanese weekday (日 ~ 土)
  - o : Old Japanese Month (霜月, 水無月, etc.)
------------------------------------------------
Field Detail
<static> {String} Pot.DateTime.format.ATOM
A constant string of the date format for ATOM.

<static> {String} Pot.DateTime.format.COOKIE
A constant string of the date format for COOKIE.

<static> {String} Pot.DateTime.format.ISO8601
A constant string of the date format for ISO8601.

<static> {String} Pot.DateTime.format.RFC1036
A constant string of the date format for RFC1036.

<static> {String} Pot.DateTime.format.RFC1123
A constant string of the date format for RFC1123.

<static> {String} Pot.DateTime.format.RFC2822
A constant string of the date format for RFC2822.

<static> {String} Pot.DateTime.format.RFC3339
A constant string of the date format for RFC3339.

<static> {String} Pot.DateTime.format.RFC822
A constant string of the date format for RFC822.

<static> {String} Pot.DateTime.format.RFC850
A constant string of the date format for RFC850.

<static> {String} Pot.DateTime.format.RSS
A constant string of the date format for RSS.

<static> {String} Pot.DateTime.format.W3C
A constant string of the date format for W3C.

Documentation generated by JsDoc Toolkit 2.4.0 on Fri Sep 21 2012 19:32:22 GMT+0900 (JST)