2017 © Pedro Peláez
 

cakephp-plugin autodate

Automatically convert date fields

image

cakephp-tutorial/autodate

Automatically convert date fields

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

A CakePHP Plugin that will auto convert date fields from SQL format to a chosen date format (eg: d/m/Y). Will auto convert the date before saving to database, before find (to match conditions on db), after find and after update, (*1)

Total Downloads Latest Stable Version, (*2)

Requirements

  • CakePHP 2
  • PHP 5.2

Compatibility

  • V 1.x - CakePHP 2

Usage

/**
 * Attach to AppModel to auto convert all date fields
 * or attach it to a single model
 **/
class AppModel extends Model {
    public $actsAs = array(
        'Autodate.Autodate' => array('dateformat' => 'd/m/Y')
    );
}

Available date Formats

  • 'd-m-Y'
  • 'd/m/Y'
  • 'Y/m/d'
  • 'Y-m-d'
  • 'Y-d-m'
  • 'Y/d/m'
  • 'm-d-Y'
  • 'm/d/Y'
  • 'Ymd'
  • 'Ydm'

Installation

Using composer

{
    "require": {
        "cakephp-tutorial/autodate": "1.0.0"
    }
}

Manually Installation

  • Download from github https://github.com/cakephp-tutorial/Autodate
  • copy in app/Plugin/Autodate
  • enable in app/Config/bootstrap.php
CakePlugin::load('Autodate');

The Versions

04/01 2016

dev-master

9999999-dev https://github.com/cakephp-tutorial/Autodate

Automatically convert date fields

  Sources   Download

MIT

The Requires

 

The Development Requires

plugin cakephp date behavior converter

28/12 2015

1.0.1

1.0.1.0 https://github.com/cakephp-tutorial/Autodate

Automatically convert date fields

  Sources   Download

MIT

The Requires

 

The Development Requires

plugin cakephp date behavior converter

23/12 2015

1.0.0

1.0.0.0 https://github.com/cakephp-tutorial/Autodate

Automatically convert date fields

  Sources   Download

MIT

The Requires

 

The Development Requires

plugin cakephp date behavior converter