UNPKG

datamodel

Version:

Relational algebra compliant in-memory tabular data store

8 lines (7 loc) 3.04 kB
--- title: "Dateformat" description: "Documented Methods" sections: - type: "markdown-section" content: "DataModel\n\nDateformat in schema helps DataModel to recognize DateTime (temporal) data. A variable is of type temporal can be\nspecified in schema\n```\n { name: 'name_of_variable', 'type': 'dimension', subtype: 'temporal' };\n```\nDataModel recognizes two date format without specifying the `dateformat` property in schema\n- Date in miliseconds from epoch date i.e. the result of `new Date(2012, 10, 20).getDate()`\n- Instance of JavaScript `Date`\n\nFor any other date format, the format needs to be specified. Following are the tokens available to specify the\nformat.\n<table>\n <tr>\n <th>Token</th>\n <th>Description</th>\n <th>Example</th>\n </tr>\n <tr>\n <td>%H</td>\n <td>24-hour format of an hour with leading zeros</td>\n <td>00 through 23</td>\n </tr>\n <tr>\n <td>%l</td>\n <td>12-hour format of an hour with leading zeros</td>\n <td>01 through 12</td>\n </tr>\n <tr>\n <td>%p</td>\n <td>Uppercase Ante meridiem and Post meridiem</td>\n <td>am or pm</td>\n </tr>\n <tr>\n <td>%p</td>\n <td>Lowercase Ante meridiem and Post meridiem</td>\n <td>AM or PM</td>\n </tr>\n <tr>\n <td>%M</td>\n <td>Minutes with leading zeros</td>\n <td>00 to 59</td>\n </tr>\n <tr>\n <td>%S</td>\n <td>Seconds, with leading zeros</td>\n <td>00 to 59</td>\n </tr>\n <tr>\n <td>%a</td>\n <td>A textual representation of a day, three letters</td>\n <td>Mon through Sun</td>\n </tr>\n <tr>\n <td>%A</td>\n <td>A full textual representation of the day of the week</td>\n <td>Sunday through Saturday</td>\n </tr>\n <tr>\n <td>%e</td>\n <td>Day of the month without leading zeros</td>\n <td>1 to 31</td>\n </tr>\n <tr>\n <td>%d</td>\n <td>Day of the month, 2 digits with leading zeros</td>\n <td>01 to 31</td>\n </tr>\n <tr>\n <td>%b</td>\n <td>A short textual representation of a month, three letters</td>\n <td>Jan through Dec</td>\n </tr>\n <tr>\n <td>%B</td>\n <td>A full textual representation of a month, such as January or March</td>\n <td>January to December</td>\n </tr>\n <tr>\n <td>%m</td>\n <td>Numeric representation of a month, with leading zeros</td>\n <td>01 through 12</td>\n </tr>\n <tr>\n <td>%y</td>\n <td>A two digit representation of a year</td>\n <td>90 for 1990</td>\n </tr>\n <tr>\n <td>%Y</td>\n <td>A full numeric representation of a year, 4 digits</td>\n <td>1990</td>\n </tr>\n</table>\n\nIn order to make DataModel recognize `1990-Sep-25` the format specification will be `%Y-%b-%e`."