FRED™  3.0
FRED™: Framework for Rapid and Easy Development
Date.php
Go to the documentation of this file.
1 <?php
2 
4 
5 class Date extends \Rsi\Fred\Controller\Widget{
6 
7  const PLACEHOLDER = 'placeholder';
8 
9  public $placeholder = null;
10 
11  public function convert($value){
12  return $this->local->convertDate($value);
13  }
14 
15  public function format($value){
16  return $this->local->formatDate($value);
17  }
18 
19  public function checkFormat($value,$index = null){
20  return preg_match('/^\\d{4}-\\d{2}-\\d{2}$/',$value);
21  }
22 
23 }
Rsi\Fred\Controller\Widget\Date\format
format($value)
Format a value from standard, internal format to user format.
Definition: Date.php:15
Rsi\Fred\Controller\Widget\Date\$placeholder
$placeholder
Definition: Date.php:9
Rsi\Fred\Controller\Widget\Date\checkFormat
checkFormat($value, $index=null)
Definition: Date.php:19
Rsi\Fred\Controller\Widget\Date\PLACEHOLDER
const PLACEHOLDER
Definition: Date.php:7
Rsi\Fred\Controller\Widget
Definition: Char.php:3
Rsi\Fred\Controller\Widget\Date\convert
convert($value)
Convert a value from user format to standard, internal format.
Definition: Date.php:11
Rsi\Fred\Controller\Widget\Date
Definition: Date.php:5