Download the PHP package deviscoding/arranged without Composer

On this page you can find all versions of the php package deviscoding/arranged. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package arranged

Dates Arranged

PHP Library with objects for managing date formats and formatting for date periods.

Formatting Functionality

Utilizing the DevCoding\Arranged\Helper\DatePeriodFormatter::format method, a native PHP DatePeriod object can be formatted using the same tokens as the \DateTimeInterface::format method. The end date string is modified to remove any redundant portions. For example, if the start & end dates are on the same calendar day, the date is entirely removed from the end date string. For more examples, see the format method.

Reduction Functionality

Utilizing the DevCoding\Arranged\Helper\DatePeriodFormatter::reduce method, a native PHP DatePeriod object can be formatted using the same tokens as the \DateTimeInterface::format method, then reduced in length to a specific length or as much as possible. For example, if the start or end times are at the top of the hour and a separator is included in the format string, the separator and the 00 is removed. For more examples, see the reduce method.

Convenience Class

For convenience, the DevCoding\Arranged\Object\DatePeriod class extends the native PHP DatePeriod class withformat and reduce methods that utilize the methods from DevCoding\Arranged\Helper\DatePeriodFormatter.

Installation & Usage

Installation is simple via composer composer require deviscoding/arranged.

Usage is simple:

$StartDate  = new \DateTime('2021-01-06 14:20:00')
$EndDate    = new \DateTime('2021-01-06 23:32:00');
$Interval   = new \DateInterval('PT15M');
$DatePeriod = new \DevCoding\DevCoding\Object\Date\DatePeriod($StartDate, $Interval, $EndDate);
$formatted  = $DatePeriod->format('l, F dS g:ia');
$reduced    = $DatePeriod->reduce('l, F dS g:ia', 40);
$further    = $DatePeriod->reduce('l, F dS g:ia');
echo $formatted.' OR '.$reduced.' OR '.$further;

The above should print Wednesday, January 6th 2:20pm-11:30pm OR Wednesday, January 6th 2:20-11:30pm OR Wed, Jan 6th, 2:20-11:30pm.

Dependencies

There are no dependencies for this library other than PHP 7+.

Saying Thanks

To be honest, simply telling a friend about this library would be thrilling. Well, that is, if I knew about it. So, maybe star the repo, mention @jonesiscoding in a tweet, or drop me a line via the email address found in the source.

I enjoy coding enough that writing code can be its own reward, but writing code that no one ever sees or uses is quite boring. I'll be very glad if this little library gets some use beyond its original use case.


All versions of arranged with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package deviscoding/arranged contains the following files

Loading the files please wait ....