Thule - 0.9.6
  • Welcome
  • Introduction
  • - MVC(Model-View-Controller)
    - Architecture of Framework
    - Flow Chart of Application
    - Services In One Server
    - Developing Guide
    - Features
  • Installation
  • Getting Started
  • - Direct Access HTTP
    - Router Access HTTP
    - Router Direct Access HTTP
    - Reserved Function
    - Convention
    - Bootstrap
    - Pack Javascript , CSS
  • Basic Modules
  • - Model
    - View
    - Controller
  • Libraries
  • - Router
    - Config
    - Response
    - Request
    - Database
    - Query
    - Cache
    - Debug
    - Log
    - Unit Test
    - Registry
    - Profile
  • Helper
  • - Auth
    - Calendar
    - Date
    - Error page
    - Email
    - Form
    - GeoIP
    - Google
    - Html Element
    - Html
    - Http
    - I18n
    - Image
    - Json
    - Jquery
    - Login
    - Layout
    - Locale
    - PHP to Javascript
    - Paging
    - Payflow
    - Soap
    - Text
    - Table
    - Uri
    - Upload
    - Validation
  • Plugins
  • - Smarty Template Engine
  • History
  • Home > Date

    Date-helper supports the various of time-format and time-zone helps .

    How to call

    $this->loadHelper('date');

    Time zone

    You can settup the timezone as default in configure.ini

    $this->Date->getTimezone();

    $this->Date->setTimezone($timezone);

    $this->Date->getListOfTimezone();

    $this->Date->getTimeFromTimezone();

    How to use

    Diplay function has several options for the format of time.

    $this->Date->display($this->Date->time(),1);
    $this->Date->display($this->Date->time(),2);
    $this->Date->display($this->Date->time(),3);
    $this->Date->display($this->Date->time(),4);
    $this->Date->display($this->Date->time(),5);
    $this->Date->display($this->Date->time(),6);
    $this->Date->display($this->Date->time(),7);

    Especially , if you choose the second parameter 6 or 7, it will diplay the time of difference from current time which is more like human readable format.