Git Product home page Git Product logo

yedtarih's Introduction

yedTarih

Php’de sıkça tarih verileriyle uğraştığım(ız) için bi’kaç tane tarih fonksiyonum vardı. Hepsini bi’sınıfta toplayayım dedim ve ortaya bu sınıf çıktı

Adını yedTarih koyduğum sınıfın iki temel özelliği var;

Tarih Döndürmek
Tarih Formatlamak

yedTarih tarih verisi alma

require_once 'yedTarih.php';

$tarih=new yedTarih();
echo $tarih->ver('tarih'); #Formatsız tarih. Örn: 2010-12-29 19:38:41
echo $tarih->ver('yil'); #Yıl. Örn: 2010
echo $tarih->ver('ay'); #Ay. Örn: Aralık
echo $tarih->ver('gun'); #Gün. Örn: Pazartesi
echo $tarih->ver('saat'); #Saat. Örn:15
echo $tarih->ver('dakika'); #Dakika. Örn:23

yedTarih tarih verisini formatlama

========
require_once 'yedTarih.php';

$tarih=new yedTarih(); $buTarih='2010-12-29 19:38:41' # Göndereceğiniz tarih verisi bu formatta olmalı echo $tarih->formatla($buTarih,'uzun'); #Örn: 20 Aralık 2010 echo $tarih->formatla($buTarih,'ideal'); #Örn: 20 Aralık '10 echo $tarih->formatla($buTarih,'kisa'); #Örn: 20.12.'10 echo $tarih->formatla($buTarih,'noktali'); #Örn: 20.12.2010 , Serpito'nun önerisi üzerine. echo $tarih->formatla($buTarih,'saatli'); #Örn: 29 Mayıs 2011, 13:00 echo $tarih->formatla($buTarih,'saatliGunlu'); #Örn: 30 Mayıs 2013, Perşembe 10:35 echo $tarih->formatla($buTarih,'gun'); #Örn: Perşembe

yedtarih's People

Contributors

yedincisenol avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

erdemildiz

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.