Skip to content

Commit 1844bd3

Browse files
committed
Merge pull request #54 from chadicus/timezone
Add DateTimeZone
2 parents a783839 + 52b43b5 commit 1844bd3

File tree

6 files changed

+331
-214
lines changed

6 files changed

+331
-214
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,14 @@ The following checks that `$value` is a date/time.
229229
$dateTime = \DominionEnterprises\Filter\DateTime::filter('2014-02-04T11:55:00-0500');
230230
```
231231

232+
#### DateTimeZone::filter
233+
Aliased in the filterer as `date`, this will filter the value as a `\DateTimeZone` object. The value can be any [supported timezone name](http://php.net/manual/en/timezones.php)
234+
235+
The following checks that `$value` is a timezone
236+
```php
237+
$timezone = \DominionEnterprises\Filter\DateTimeZone::filter('America/New_York');
238+
```
239+
232240
##Contact
233241
Developers may be contacted at:
234242

composer.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
"require": {
2424
"php": "~5.4"
2525
},
26+
"suggest": {
27+
"ext-timezonedb": "The latest version of the timezone database"
28+
},
2629
"require-dev": {
2730
"phpunit/phpunit": "~4.1",
2831
"satooshi/php-coveralls": "~0.6.1",

0 commit comments

Comments
 (0)