Code Monkey home page Code Monkey logo

codeigniter-library's Introduction

Personal Codeigniter libraries and helpers

This is a set of libraries and helpers that I use in all my projects so I thought it was about time to centralize it all and also share it…

  • text_formatting – Make a MySQL DATETIME stamp look a little nicer!

text_formatting

This will take a MySQL DATETIME stamp or whatever and will format it.

  • If the date+time is within the last few minuets it will return ‘Just now! (2:30pm)
  • If the date+time was today it will return ‘Today
  • If the date+time was yesterday it will return ‘Yesterday
  • If the date+time is tomorrow it will return Tomorrow ’ . date(“g:ia”, $my_date)
(For today, yesterday and tomorrow – if there is a time it will also output the time)

$this->load->library('text_formatting');
//$my_sql_datetime = '2010-10-04 22:25:15';
echo $this->text_formatting->date_special($my_sql_datetime);

codeigniter-library's People

Contributors

jamesmills avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.