Download the PHP package eden/timezone without Composer
On this page you can find all versions of the php package eden/timezone. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download eden/timezone
More information about eden/timezone
Files in eden/timezone
Package timezone
Short Description Eden timezone component.
License MIT
Homepage http://eden-php.com
Informations about the package timezone
Eden Timezone
- Install
- Introduction
- API
- convertTo
- getGMT
- getGMTDates
- getOffset
- getOffsetDates
- getTime
- getUTC
- getUTCDates
- toRelative
- setTime
- validation
- Contributing
====
Install
composer install eden/timezone
====
Introduction
Instantiate timezone in this manner.
====
API
====
convertTo
Convert current time set here to another time zone
Usage
Parameters
*string $zone
- valid UTC, GMT, PHP Location or TZ Abbreviationstring|null $format
- format
Returns string|int
Example
====
getGMT
Returns the GMT Format
Usage
Parameters
string $prefix
- Prefix to add before the returned value
Returns string
Example
====
getGMTDates
Returns a list of GMT formats and dates in a 24 hour period
Usage
Parameters
*string $format
- The format of each date to displayint $interval
- The frequency of rowsstring|null $prefix
- The prefix to add before each date display
Returns array
Example
====
getOffset
Returns the current offset of this timezone
Usage
Parameters
Returns int
====
getOffsetDates
Returns a list of offsets and dates in a 24 hour period
Usage
Parameters
*string $format
- The format of each date to displayint $interval
- The frequency of rows
Returns array
Example
====
getTime
Returns the time or date
Usage
Parameters
string|null $format
- Time format
Returns string|int
Example
====
getUTC
Returns the UTC Format
Usage
Parameters
string|null $prefix
- The prefix to add before the returned value
Returns string
Example
====
getUTCDates
Returns a list of UTC formats and dates in a 24 hour period
Usage
Parameters
*string $format
- The format of each date to displayint $interval
- The frequency of rowsstring|null $prefix
- The prefix to add before each date display
Returns array
Example
====
toRelative
Returns the relative distance $time > this->time = ago
Usage
Parameters
int|string $time
- The time to make relativeint $level
- The granular levelstring $default
- The default date format
Returns Eden\Timezone\Index
Example
====
setTime
Sets a new time
Usage
Parameters
*int|string $time
- The time value
Returns Eden\Timezone\Index
Example
====
validation
Returns timezone's validation methods
Usage
Parameters
Returns Eden\Timezone\Index
====
Contributing to Eden
Contributions to Eden are following the Github work flow. Please read up before contributing.
Setting up your machine with the Eden repository and your fork
- Fork the repository
- Fire up your local terminal create a new branch from the
v4
branch of your fork with a branch name describing what your changes are. Possible branch name types:- bugfix
- feature
- improvement
- Make your changes. Always make sure to sign-off (-s) on all commits made (git commit -s -m "Commit message")
Making pull requests
- Please ensure to run
phpunit
before making a pull request. - Push your code to your remote forked version.
- Go back to your forked version on GitHub and submit a pull request.
- An Eden developer will review your code and merge it in when it has been classified as suitable.