Download the PHP package jenssegers/date without Composer

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

Date

Latest Stable Version Total Downloads Build Status Coverage Status Donate

This date library extends Carbon with multi-language support. Methods such as format, diffForHumans, parse, createFromFormat and the new timespan, will now be translated based on your locale.

All translations made by contributors have been moved to the Carbon 2 package. This package now uses the Carbon translations to provide you with better multi-language support. Translation issues should be reported on the Carbon repository. Please also check out the original documentation here.

Installation

Install using composer:

Laravel

There is a service provider included for integration with the Laravel framework. This provider will get the application locale setting and use this for translations. This service will be automatically registered if you use Laravel 5.5+ using the auto-discovery. Else to register the service provider, add the following to the providers array in config/app.php:

You can also add it as a Facade in config/app.php:

Languages

This package contains language files for the following languages (https://carbon.nesbot.com/docs/#supported-locales):

Usage

The Date class extends the Carbon methods such as format and diffForHumans, and translates them based on your locale:

The Date class also added some aliases and additional methods such as: ago which is an alias for diffForHumans, and the timespan method:

Methods such as parse and createFromFormat also support "reverse translations". When calling these methods with translated input, it will try to translate it to English before passing it to DateTime:

Carbon

Carbon is the library the Date class is based on. All of the original Carbon operations are still available, check out https://carbon.nesbot.com/docs for more information. Here are some of the available methods:

Creating dates

You can create Date objects just like the DateTime object (http://www.php.net/manual/en/datetime.construct.php):

You can skip the creation of a DateTimeZone object:

Create Date objects from a relative format (http://www.php.net/manual/en/datetime.formats.relative.php):

This is also available using these static methods:

Creating a Date from a timestamp:

Or from an existing date or time:

Formatting Dates

You can format a Date object like the DateTime object (http://www.php.net/manual/en/function.date.php):

The Date object can be cast to a string:

Get a human readable output (alias for diffForHumans):

Calculate a timespan:

Get years since date:

Manipulating Dates

You can manipulate by using the add and sub methods, with relative intervals (http://www.php.net/manual/en/datetime.formats.relative.php):

You can access and modify all date attributes as an object:

Contributing

Language contributions should made to https://github.com/briannesbitt/Carbon.

License

Laravel Date is licensed under The MIT License (MIT).

Security contact information

To report a security vulnerability, follow these steps.


All versions of date with dependencies

PHP Build Version
Package Version
Requires nesbot/carbon Version ^2.16
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 jenssegers/date contains the following files

Loading the files please wait ....