commit
5b46e54133
|
@ -38,7 +38,7 @@ Options may by associative array like `'option_name' => true` or bitwise mask.
|
||||||
|
|
||||||
```php
|
```php
|
||||||
$fenom->setOptions(array(
|
$fenom->setOptions(array(
|
||||||
"compile_check" => true,
|
"force_compile" => true,
|
||||||
"force_include" => true
|
"force_include" => true
|
||||||
));
|
));
|
||||||
// same
|
// same
|
||||||
|
|
|
@ -8,12 +8,12 @@ By default format is: `%b %e, %Y`.
|
||||||
```smarty
|
```smarty
|
||||||
{var $ts = time()}
|
{var $ts = time()}
|
||||||
|
|
||||||
{$ts|date_format:"%Y/%m/%d %H:%M:%s"} outputs 2013/02/08 21:01:43
|
{$ts|date_format:"%Y/%m/%d %H:%M:%S"} outputs 2013/02/08 21:01:43
|
||||||
{$ts|date_format:"-1 day"} outputs 2013/02/07 21:01:43
|
{$ts|date_format:"-1 day"} outputs 2013/02/07 21:01:43
|
||||||
|
|
||||||
{var $date = "2008-12-08"}
|
{var $date = "2008-12-08"}
|
||||||
|
|
||||||
{$ts|date_format:"%Y/%m/%d %H:%M:%s"} outputs 2008/12/08 00:00:00
|
{$ts|date_format:"%Y/%m/%d %H:%M:%S"} outputs 2008/12/08 00:00:00
|
||||||
```
|
```
|
||||||
|
|
||||||
[Allowed quantificators](http://docs.php.net/strftime#refsect1-function.strftime-parameters) in **date_format**
|
[Allowed quantificators](http://docs.php.net/strftime#refsect1-function.strftime-parameters) in **date_format**
|
||||||
|
|
|
@ -43,7 +43,7 @@ $fenom->setOptions($options);
|
||||||
|
|
||||||
```php
|
```php
|
||||||
$fenom->setOptions(array(
|
$fenom->setOptions(array(
|
||||||
"compile_check" => true,
|
"force_compile" => true,
|
||||||
"force_include" => true
|
"force_include" => true
|
||||||
));
|
));
|
||||||
// тоже самое что и
|
// тоже самое что и
|
||||||
|
|
|
@ -14,12 +14,12 @@
|
||||||
```smarty
|
```smarty
|
||||||
{var $ts = time()}
|
{var $ts = time()}
|
||||||
|
|
||||||
{$ts|date_format:"%Y/%m/%d %H:%M:%s"} выведет 2013/02/08 21:01:43
|
{$ts|date_format:"%Y/%m/%d %H:%M:%S"} выведет 2013/02/08 21:01:43
|
||||||
{$ts|date_format:"-1 day"} выведет вчерашний день, например 2013/02/07 21:01:43
|
{$ts|date_format:"-1 day"} выведет вчерашний день, например 2013/02/07 21:01:43
|
||||||
|
|
||||||
{var $date = "2008-12-08"}
|
{var $date = "2008-12-08"}
|
||||||
|
|
||||||
{$ts|date_format:"%Y/%m/%d %H:%M:%s"} выведет 2008/12/08 00:00:00
|
{$ts|date_format:"%Y/%m/%d %H:%M:%S"} выведет 2008/12/08 00:00:00
|
||||||
```
|
```
|
||||||
|
|
||||||
[Конверсионные указатели](http://docs.php.net/ru/strftime#refsect1-function.strftime-parameters) в модификаторе **date_format**:
|
[Конверсионные указатели](http://docs.php.net/ru/strftime#refsect1-function.strftime-parameters) в модификаторе **date_format**:
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
Блок указывает фрагмент шаблона, который будет передан родителю. Имя блока должно быть задано явно:
|
Блок указывает фрагмент шаблона, который будет передан родителю. Имя блока должно быть задано явно:
|
||||||
|
|
||||||
```smarty
|
```smarty
|
||||||
{block bk1}content 1{/block}
|
{block 'bk1'}content 1{/block}
|
||||||
...
|
...
|
||||||
{block 'bk2'}content 2{/block}
|
{block 'bk2'}content 2{/block}
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue