Download the PHP package stellarwp/dates without Composer

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

StellarWP Dates

Tests Static Analysis

A collection of date utilities authored by the development team at StellarWP and provided free for the WordPress community.

This work is forked from the battle-tested date handling done at The Events Calendar!

Installation

It's recommended that you install Dates as a project dependency via Composer:

We actually recommend that this library gets included in your project using Strauss.

Luckily, adding Strauss to your composer.json is only slightly more complicated than adding a typical dependency, so checkout our strauss docs.

Documentation

How dates are built

The Dates::get() method accepts a number of parameters (a date, a timezone, a fallback date, and an immutable flag). However, you can get the current datetime with a simple call to Dates::get() like so:

Whether you are using that simple approach or something more complex, here's what is happening under the hood:

Constants

Constant Format Description
DATEONLYFORMAT F j, Y The date format used for date-only strings.
TIMEFORMAT g:i A The time format used for time-only strings.
HOURFORMAT g The hour format used for hour-only strings.
MINUTEFORMAT i The minute format used for minute-only strings.
MERIDIANFORMAT A The meridian format used for meridian-only strings.
DBDATEFORMAT Y-m-d The date format used for date-only strings in the database.
DBDATETIMEFORMAT Y-m-d H:i:s The date format used for date-time strings in the database.
DBTZDATETIMEFORMAT Y-m-d H:i:s O The date format used for date-time strings in the database with timezone.
DBTIMEFORMAT H:i:s The date format used for time-only strings in the database.
DBYEARMONTHTIMEFORMAT Y-m The date format used for year-month strings in the database.

All versions of dates with dependencies

PHP Build Version
Package Version
No informations.
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 stellarwp/dates contains the following files

Loading the files please wait ....