1
0
mirror of https://github.com/fzaninotto/Faker.git synced 2025-03-24 09:19:50 +01:00

Added timezone generator to DateTime provider.

Fixed typo.

Fixed doc alignment.
This commit is contained in:
Benjamin Laugueux 2012-08-14 15:03:02 +02:00
parent a7b85d8a3d
commit c735e6b907
2 changed files with 8 additions and 0 deletions

View File

@ -142,6 +142,7 @@ Each of the generator properties (like `name`, `address`, and `lorem`) are calle
monthName // 'January'
year // '1993'
century // 'VI'
timezone // 'Europe/Paris'
### `Faker\Provider\Miscellaneous`

View File

@ -178,4 +178,11 @@ class DateTime extends \Faker\Provider\Base
return static::randomElement(static::$century);
}
/**
* @example 'Europe/Paris'
*/
public static function timezone()
{
return static::randomElement(\DateTimeZone::listIdentifiers());
}
}