Download the PHP package adspectus/date-extended without Composer

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

k3-date-extended

GitHub tag (latest by date) GitHub issues GitHub license Kirby version

Kirby 3 plugin to provide additional date fields as epoch.

The rationale to use the epoch, which is the number of seconds starting from Jan. 1, 1970 0:00 GMT as a date/time field, is to have an universally valid piece of information about the date and time from which one can derive all other kind of information, i.e. the same point in time in different timezones. Moreover, it is easier to calculate or compare different dates or points in time using the epoch. The drawback is that it is not very human-friendly to read and write. However, there shouldn't be any serious programming or scripting language which does not contain built-in functions to convert back and forth between the epoch and a human-friendly date and time.

The epoch as it is written by the time() function used here, always refers to GMT, which can be used as being the same time as UTC, even though GMT and UTC are not the same. Thus, the value of the epoch is independent from the timezone setting in your php.ini file, but the formatted date as returned by the date() function will take that into account.

Getting Started

Prerequisites

Installation

You can install this plugin via one of the following methods:

  1. Composer

    composer require adspectus/date-extended

  2. Manual

    Clone this repository or download the current release and extract the file index.php into a new folder site/plugins/date-extended of your Kirby installation.

Usage

This plugin uses the page.create:after hook to store 2 additional fields into the page, the creation and modification date/time as a Unix Epoch. With the page.update:after and the page.changeTitle:after hooks only the modification date is updated.

In addition to that, the plugin provides a field method epoch2date to return this epoch in a formatted string. The default format of this string is set to D, j M Y H:i:s T, but this can be changed on a global level in site-config with

'adspectus.date-extended.dateFormat' => string or constant

or as a parameter to the field method.

The fieldnames can be set with

'adspectus.date-extended.dateCreated' => 'myCreationDate',
'adspectus.date-extended.dateModified' => 'myModificationDate',

Otherwise they default to dateCreatedEpoch and dateModifiedEpoch resp.

Examples

After installation of this plugin, when you create and afterwards change (text or title) a page, you will have these fields in your content file:

Then, you can use this in your blueprint:

and in the panel it will look like this:

License

GNU General Public License v3.0

Acknowledgements


All versions of date-extended with dependencies

PHP Build Version
Package Version
Requires getkirby/composer-installer Version ^1.1
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 adspectus/date-extended contains the following files

Loading the files please wait ....