Skip to content

Commit

Permalink
Added timezone generator to DateTime provider.
Browse files Browse the repository at this point in the history
Fixed typo.

Fixed doc alignment.
  • Loading branch information
Benjamin Laugueux committed Sep 3, 2012
1 parent a7b85d8 commit c735e6b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand Down
7 changes: 7 additions & 0 deletions src/Faker/Provider/DateTime.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,4 +178,11 @@ public static function century()
return static::randomElement(static::$century);
}

/**
* @example 'Europe/Paris'
*/
public static function timezone()
{
return static::randomElement(\DateTimeZone::listIdentifiers());
}
}

0 comments on commit c735e6b

Please sign in to comment.