<?php
function times(){ ini_set('date.timezone','Asia/Shanghai'); $time = date("Y-m-d H:i"); /*5.1*/
if($time>"2017-05-01 09:00" && $time<"2017-05-01 09:20"){
return "in";
}
if($time>"2017-05-01 10:00" && $time<"2017-05-01 10:20"){
return "in";
}
if($time>"2017-05-01 11:00" && $time<"2017-05-01 11:20"){
return "in";
}
if($time>"2017-05-01 15:00" && $time<"2017-05-01 15:20"){
return "in";
}
if($time>"2017-05-01 16:00" && $time<"2017-05-01 16:20"){
return "in";
}
if($time>"2017-05-01 17:00" && $time<"2017-05-01 17:20"){
return "in";
} /*5.2*/
if($time>"2017-05-02 09:00" && $time<"2017-05-02 09:20"){
return "in";
}
if($time>"2017-05-02 10:00" && $time<"2017-05-02 10:20"){
return "in";
}
if($time>"2017-05-02 11:00" && $time<"2017-05-02 11:20"){
return "in";
}
if($time>"2017-05-02 15:00" && $time<"2017-05-02 15:20"){
return "in";
}
if($time>"2017-05-02 16:00" && $time<"2017-05-02 16:20"){
return "in";
}
if($time>"2017-05-02 17:00" && $time<"2017-05-02 17:20"){
return "in";
} /*5.3*/
if($time>"2017-05-03 09:00" && $time<"2017-05-03 09:20"){
return "in";
}
if($time>"2017-05-03 10:00" && $time<"2017-05-03 10:20"){
return "in";
}
if($time>"2017-05-03 11:00" && $time<"2017-05-03 11:20"){
return "in";
}
if($time>"2017-05-03 15:00" && $time<"2017-05-03 15:20"){
return "in";
}
if($time>"2017-05-03 16:00" && $time<"2017-05-03 16:20"){
return "in";
}
if($time>"2017-05-03 17:00" && $time<"2017-05-03 17:20"){
return "in";
} return "noin"; }
?>

php时间段判断的更多相关文章

  1. 【重要】攻击动作时间段判断~使用动画time比较动画length和使用一个变量数组做延迟

    using UnityEngine; using System.Linq; using System.Collections.Generic; [RequireComponent(typeof(Cha ...

  2. c#日期时间段判断

    select * from 表名 where (case when ISDATE(字段名)=1 then CONVERT(varchar(100),cast(字段名 as datetime),23) ...

  3. easyui-validatebox 验证

    required: "必选字段",        remote: "请修正该字段",        email: "请输入正确格式的电子邮件" ...

  4. Jquery easyui中的有效性检查

    使用过程中的一积累,备查. EasyUI 验证框使用方法: //*************************** missingMessage:未填写时显示的信息 validType:验证类型见 ...

  5. EasyUI 验证框使用方法

    使用过程中的一积累,备查. EasyUI 验证框使用方法://***************************missingMessage:未填写时显示的信息validType:验证类型见下示例 ...

  6. EasyUI 验证

    使用过程中的一积累,备查. EasyUI 验证框使用方法://***************************missingMessage:未填写时显示的信息validType:验证类型见下示例 ...

  7. Ruby on Rails中的Rake教程(Rake如何把我灌醉!)

    下面是我们使用Rake任务的例子: 1.给列表中的用户发送邮件 2.每晚数据的计算和报告 3.过期或重新生成缓存 4.备份数据和svn版本(how's this : subversion reposi ...

  8. 「kuangbin带你飞」专题十二 基础DP

    layout: post title: 「kuangbin带你飞」专题十二 基础DP author: "luowentaoaa" catalog: true tags: mathj ...

  9. vue2.0 + vux (六)NewsList 资讯页 及 NewsDetail 资讯详情页

    设置代理,避免出现跨域问题 /*设置代理,避免出现跨域问题*/ proxyTable: { '/api':{ target: 'https://www.oschina.net/action/apiv2 ...

随机推荐

  1. ubuntu java 环境配置

    下载oracle java sudo add-apt-repository ppa:webupd8team/java -y sudo apt-get update sudo apt-get insta ...

  2. FFmpeg(4)-使用avformat_find_stream_info()来探测获取封装格式的上下文信息

    /** * Read packets of a media file to get stream information. This * is useful for file formats with ...

  3. Fluent UDF【3】:环境配置

    windows操作系统下UDF的编译需要借助Visual Studio中的C编译器.因此若要想编译UDF,则必须事先配置好编译环境. Visual Studio Visual Stuido(后面简称V ...

  4. SQL 中 replace 替换字符串中的字符 ''

    update CfmRcd set reconsource=replace(reconsource,'''',''), cmffile =replace(cmffile,'''',''), cfmda ...

  5. angular学习笔记(三十)-指令(7)-compile和link(2)

    继续上一篇:angular学习笔记(三十)-指令(7)-compile和link(1) 上一篇讲了compile函数的基本概念,接下来详细讲解compile和link的执行顺序. 看一段三个指令嵌套的 ...

  6. 【MySQL】MySQL层级数据的递归遍历

    层级的业务数据在系统中很常见,如组织机构.商品品类等. 如果要获取层级数据的全路径,除了缓存起来,就是递归访问的方式了: 将层级数据缓存在redis中,用redis递归获取层级结构.此方法效率高. 在 ...

  7. JAVA Zero Copy的相关知识【转】

    转自:https://my.oschina.net/cloudcoder/blog/299944 摘要: java 的zero copy多在网络应用程序中使用.Java的libaries在linux和 ...

  8. echarts的时间线图表

    <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <script sr ...

  9. 多媒体文件格式之TS

    [时间:2016-07] [状态:Open] TS流是MPEG-2标准中定义一种用于直播的码流结构,具有很好的容错能力.所有跟TS相关的标准可以从ISO/IEC_13818-1中找到. 通常TS流的后 ...

  10. 【转】MATLAB conv2函数的理解

    另附:http://blog.csdn.net/anan1205/article/details/12313593 原文:http://blog.csdn.net/andrewseu/article/ ...