Download the PHP package nxmcz/date-time without Composer

On this page you can find all versions of the php package nxmcz/date-time. 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 date-time

DateTime

An immutable class to deal with DateTime object used in Noxem systems. Works perfectly with nette/forms as Date, DateTime form's field.

PHP 8.2 ready!!

Testing Coverage Status Mutation testing badge License Latest Stable Version Total Downloads License PHP Version Require

Requirements

This library requires PHP 8.1 or later.

Usage

Noxem\DateTime\DT

Basic initialization of DT object. DT object is child of native DateTimeImmutable object with handles for modify date/time parts.

Library supports casting object into HTML's native input types

Comparation:

isFuture(): bool We operating with future?

Noxem\DateTime\Difference

Difference formula can be imagined as x = a - b, where a is object which calling child method, formula example is x = $b->difference($a) Difference class is accessible with method: DT::create()->difference(DT $suspect)

Output of class is signed numbers. Where: positive numbers represent future, negative going back to future.

Sign of number Example Description
- -5 Past
+ +5 Future

Method withAbsolute() ignores negative numbers on methods, difference will be always in positive numbers

Method is also immutable.

Noxem\DateTime\Overlap

Next method is for compare two objects if overlap or not.

Overlapping class handles only with one method (in future quantities increase). Description of interval overlap statements are presented in table below:

Step Interval visualisation Result
BORDERS             I           I            
After      ██████ I           I             FALSE
Start touching      ███████I           I             FALSE
Start inside         ████I██         I             TRUE
Inside start touching             I███████████I███████      TRUE
Enclosing start touching             I██████     I             TRUE
Enclosing             I    █████  I             TRUE
Enclosing end touching             I       ████I             TRUE
Exact match             I███████████I             TRUE
Inside         ████I███████████I██████       TRUE
Inside end touching         ████I███████████I             TRUE
End inside             I       ████I████████████ TRUE
End touching             I           I████████████ FALSE
Before             I           I ███████████ FALSE

Exception

Bad DateTime format throws an exception which is children of InvalidArgumentException


All versions of date-time with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1 <8.4
nette/utils Version ^4.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 nxmcz/date-time contains the following files

Loading the files please wait ....