mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-13 03:23:18 +03:00
Added comment banners to helpers.
This commit is contained in:
parent
b0db1289f4
commit
b68afb8a71
1 changed files with 29 additions and 18 deletions
|
@ -1,18 +1,29 @@
|
||||||
<?php
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
/**
|
/* ----------------------------------------------------------------------------
|
||||||
* Check if a string date is valid for insertion or update
|
* Easy!Appointments - Open Source Web Scheduler
|
||||||
* to the database.
|
*
|
||||||
*
|
* @package EasyAppointments
|
||||||
* @param string $datetime The given date.
|
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||||
* @return bool Returns the validation result.
|
* @copyright Copyright (c) 2013 - 2015, Alex Tselegidis
|
||||||
*
|
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||||
* @link http://stackoverflow.com/a/8105844/1718162 [SOURCE]
|
* @link http://easyappointments.org
|
||||||
*/
|
* @since v1.0.0
|
||||||
function validate_mysql_datetime($datetime) {
|
* ---------------------------------------------------------------------------- */
|
||||||
$dt = DateTime::createFromFormat('Y-m-d H:i:s', $datetime);
|
|
||||||
return ($dt) ? TRUE : FALSE;
|
/**
|
||||||
}
|
* Check if a string date is valid for insertion or update
|
||||||
|
* to the database.
|
||||||
/* End of file data_validation_helper.php */
|
*
|
||||||
/* Location: ./application/helpers/data_validation_helper.php */
|
* @param string $datetime The given date.
|
||||||
|
* @return bool Returns the validation result.
|
||||||
|
*
|
||||||
|
* @link http://stackoverflow.com/a/8105844/1718162 [SOURCE]
|
||||||
|
*/
|
||||||
|
function validate_mysql_datetime($datetime) {
|
||||||
|
$dt = DateTime::createFromFormat('Y-m-d H:i:s', $datetime);
|
||||||
|
return ($dt) ? TRUE : FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* End of file data_validation_helper.php */
|
||||||
|
/* Location: ./application/helpers/data_validation_helper.php */
|
||||||
|
|
Loading…
Reference in a new issue