GithubHelp home page GithubHelp logo

brazil_data_format's Introduction

BRAZIL DATA FORMAT

Classe simples para converter datas no formato TIMESTAMP (yyyy-mm-dd hh:ii:ss) para o padrão brasileiro.

Utilização

Para utilizar essa classe, basta fazer o seguinte:

include '/path/to/file/DataForm.class.php'; //inclui a classe

$data = new DataForm(); //Instancia a classe dentro de uma variável

$timestamp = '2014-01-01 23:59:59'; //data no formato TIMESTAMP

$data->set_data($timestamp); //seta a data dentro da classe

//Imprimindo a data formatada na tela na tela
echo $data->get_data($data); //retorna a data com o ano abreviado. Ex.: 01/01/14
echo $data->get_data_full($data); //retorna a data com o ano completo. Ex.: 01/01/2014
echo $data->get_hora($data); //retorna a hora, no fomrato 23:59:59.

brazil_data_format's People

Contributors

santosbio avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.