Fb:date
From Facebook Developer Wiki
Contents |
Description
Renders a date. This will adjust the date format correctly depending on the locale settings of the viewing user.
| Format Name | English Example | Spanish Example |
| long_numeric | 07/15/2008 | 15/07/2008 |
| short_numeric | 7/15 | 15/07 |
| verbose | Tuesday, July 15, 2008 | martes, 15 de julio de 2008 |
| monthname_year | July 15, 2008 | 15 de julio de 2008 |
| monthname | July 15 | 15 de julio |
| long_numeric_time | 07/15/2008 6:14pm | 15/07/2008 18:14 |
| short_numeric_time | 7/15, 6:14pm | 15/07 18:14 |
| verbose_time | Tuesday, July 15, 2008 at 6:14pm | martes, 15 de julio de 2008 a las 18:14 |
| monthname_year_time | July 15, 2008 at 6:14pm | 15 de julio de 2008 a las 18:14 |
| monthname_time | July 15 at 6:14pm | 15 de julio a las 18:14 |
Attributes
| Required | Name | Type | Description | |
| required | t | int | The time to render, in POSIX time_t format (that is, seconds since midnight on January 1, 1970 GMT) | |
|---|---|---|---|---|
| optional | format | string | Which format to use. The available formats are listed in the table in the Description above. (Default value is verbose_time.) | |
| tz | string | The time zone to use when rendering the date/time. Default is the logged-in user's time zone. |
Examples
Displays "07/15/2008" for users viewing Facebook in American English, "15/07/2008" for most European language users, "2008年7月5日" for Chinese and Japanese users, etc.
Displays "January 1 at 12:00am" for users viewing in American English, "1 January at 00:00" for users in British English, etc.
Displays "December 31 at 4:00pm" for users viewing in American English, "31 December at 16:00" for users in British English, etc.
Notes
Be aware of the fact that date formats can vary substantially in length between locales. Don't assume that if you leave just enough space in your layout for an English date, you will have enough room for dates in all languages; you probably won't.
