Timemap.js v.2.0.1

Namespace TimeMap.dateParsers

Defined in:
timemap.js

Lookup map of supported date parser functions. Add custom date parsers here if you want to refer to them by key rather than as a function name.

    TimeMap.init({
        datasets: [
            {
                options: {
                    dateParser: "gregorian"
                },
                // etc...
            }
        ],
        // etc...
    });

Static Methods

Method
TimeMap.dateParsers.gregorian(s)
Better Timeline Gregorian parser.
TimeMap.dateParsers.hybrid(s)
Parse date strings with a series of date parser functions, until one works.
TimeMap.dateParsers.iso8601()
ISO8601 parser: parse ISO8601 datetime strings
Namespace Detail
TimeMap.dateParsers
Static Method Details
TimeMap.dateParsers.gregorian(s) :{Date}
Better Timeline Gregorian parser... shouldn't be necessary :(. Gregorian dates are years with "BC" or "AD"
Parameters (optional)
s {String} String to parse into a Date object
Returns:
{Date} Parsed date or null
TimeMap.dateParsers.hybrid(s) :{Date}
Parse date strings with a series of date parser functions, until one works. In order:
  1. Date.parse() (so Date.js should work here, if it works with Timeline...)
  2. Gregorian parser
  3. The Timeline ISO 8601 parser
Parameters (optional)
s {String} String to parse into a Date object
Returns:
{Date} Parsed date or null
TimeMap.dateParsers.iso8601()
ISO8601 parser: parse ISO8601 datetime strings
©2010 Nick Rabinowitz
Documentation generated by JsDoc Toolkit 2.3.2 on Sat Aug 06 2011 13:40:07 GMT-0700 (PDT)