Giter Site home page Giter Site logo

someUtilityPHPClass

Gitter

##DateRange.php

Join the chat at https://gitter.im/hamdon/hamdon

input one date and then can ouput the timestamp range and date array include year、month、day

input e.g.: 2016、2016-01、2016-01-02

输入一个日期,然后能输出这个日期的时间戳开始和结束的时间段,还可以返回日期数据,包括年、月、日

usage:

$date = date("Y-m",time());
$dateRange = new \Hamdon\DateRange();
$dateRange->inputDate = $date;
//start timestamp 开始时间戳
$startTimestamp = $dateRange->startTime();
//end timestamp 结束时间戳
$endTimestamp = $dateRange->endTime();
//date array e.g.:$dates['year'] = xx、$dates['month']=xx、$dates[`day`] = 0 
//日期数组 比如:$dates['year'] = xxx、$dates['month']=xx、$dates[`day`] = 0 
$dates = $dateRange->getYearMonthDayArray();

hamdon's Projects

advanced-php icon advanced-php

最近打算写一些php一些偏微妙的教程,比如关于多进程、socket等相关,都是自己的一些感悟心得

cat icon cat

CAT 作为服务端项目基础组件,提供了 Java, C/C++, Node.js, Python, Go 等多语言客户端,已经在美团点评的基础架构中间件框架(MVC框架,RPC框架,数据库框架,缓存框架等,消息队列,配置系统等)深度集成,为美团点评各业务线提供系统丰富的性能指标、健康状况、实时告警等。

citymap icon citymap

高德&腾讯地图三级城市数据

go-gin-mvc icon go-gin-mvc

基于框架gin+xorm搭建的MVC项目架子,适合初学者

laravel-u-editor icon laravel-u-editor

UEditor for laravel5. Support i18n. UEditor is a Rich Text Web Editor From Baidu.

law-man icon law-man

collect system exception for laravel

markdownediting icon markdownediting

Powerful Markdown package for Sublime Text with better syntax understanding and good color schemes.

monitor-api icon monitor-api

monitor api 只是一般监测,可以排查接口代码有没有错误,发现错误后,通过微信企业号发通知

php-ffmpeg icon php-ffmpeg

An object oriented PHP driver for FFMpeg binary

tonyenc icon tonyenc

高性能、跨平台的 PHP7 代码加密扩展 (A high performance and cross-platform encrypt extension for PHP source code)

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.