Menu
©2015
Documentation generator: JsDoc Toolkit 2.4.0
Template: Codeview 1.2
Generated on: 2015-1-16 18:32

Namespace puredom.date

  • Functions for working with dates
    See http://php.net/strftime for formatting options.

  • Defined in: date.js
Namespace Summary
Constructor Attributes Constructor Name and Description
 
Field Summary
Field Attributes Field Name and Description
<static>  
puredom.date.months
Month names
<static>  
puredom.date.weekdays
Weekday names

Method Summary

Method Attributes Method Name and Description
<static>  
puredom.date. create (str)
Create a date, optionally from a string.
<static>  
puredom.date. format (date, format)
Get a formatted string representation of a Date object.
<static>  
puredom.date. now ()
Returns the current timestamp, in milliseconds.
<static>  
puredom.date. parse (str, format)
Parse a string with the given format into a Date object.

Namespace Detail

puredom.date

Field Detail

<static> {Array(String)} puredom.date.months
Month names
<static> {Array(String)} puredom.date.weekdays
Weekday names

Method Detail

  • <static> {Date} puredom.date.create(str)
    Create a date, optionally from a string.
    This is a wrapper on new Date(str), adding support for more date formats and smoothing out differences between browsers.
    Parameters:
    {String} str Optional, Default: now
    A date string, parsed and used to set the initial date.
    Returns:
    {Date} a new date object.
  • <static> {String|Boolean} puredom.date.format(date, format)
    Get a formatted string representation of a Date object.
    Parameters:
    {String} date
    A date object to convert
    {String} format Optional, Default: "%d/%m/%Y"
    A date format string. See http://php.net/strftime for available fields.
    Returns:
    {String|Boolean} the formatted date string, or false on failure.
  • <static> {Number} puredom.date.now()
    Returns the current timestamp, in milliseconds.
    Returns:
    {Number} timestamp
  • <static> {Date|Boolean} puredom.date.parse(str, format)
    Parse a string with the given format into a Date object.
    Parameters:
    {String} str
    A date string to parse
    {String} format Optional, Default: "%d/%m/%Y"
    A date format string. See http://php.net/strftime for available fields.
    Returns:
    {Date|Boolean} the date, or false on failure.