//判断日期,时间大小
function compareTime(startDate, endDate) {
if (startDate.length > 0 && endDate.length > 0) {
var startDateTemp = startDate.split(" ");
var endDateTemp = endDate.split(" "); var arrStartDate = startDateTemp[0].split("-");
var arrEndDate = endDateTemp[0].split("-"); var arrStartTime = startDateTemp[1].split(":");
var arrEndTime = endDateTemp[1].split(":"); var allStartDate = new Date(arrStartDate[0], arrStartDate[1], arrStartDate[2], arrStartTime[0], arrStartTime[1], arrStartTime[2]);
var allEndDate = new Date(arrEndDate[0], arrEndDate[1], arrEndDate[2], arrEndTime[0], arrEndTime[1], arrEndTime[2]); if (allStartDate.getTime() >= allEndDate.getTime()) {
return false;
} else {
return true;
}
} else {
return false;
}
}

js 格式为2018-08-25 11:46:29 的日期比较方法的更多相关文章

  1. js new Date("2016-07-01 08:00:00") 格式在IE内核浏览器中显示NaN的问题

    js new Date("2016-07-01 08:00:00") 格式在IE内核浏览器中显示NaN的问题 废话就不多了,var dd = new Date("2016 ...

  2. 新手C#面向对象的学习2018.08.06

    class Person//声明一个Person类 { //类中的声明与Main中不同,类中声明的是字段而不是函数. public string gender; public string name= ...

  3. 新手C#string类常用函数的学习2018.08.04

    ToLower()用于将字符串变为小写,注意字符串的不可变特性,需要重新赋值给另一个字符串变量. s = s.ToLower();//字符串具有不可变性,转换后需要重新赋值,不可仅有s.ToLower ...

  4. Intel Digital Innovation Industry Summit(2018.08.17)

    时间:2018.08.17地点:北京金隅喜来登大酒店

  5. 2018/04/25 基于 编译安装的 PHP7 安装 swoole 扩展

    在上一篇文章我们知道了如何去编译安装一个自己需要的 PHP 版本. 2018/04/25 PHP7的编译安装 这里还没有完,我们还需要安装我们的扩展,才算完成今天的任务. -- 下载扩展 还是官网下载 ...

  6. 2018天猫双11各类目品牌成交额top10排行榜

    2018天猫双11总成交额213,550,497,011元,你知道各类目品牌成交额排行吗?一起来看看吧,赶紧收藏,以后就知道要怎么买了! 相关阅读: 2018天猫双11各类目品牌成交额top10排行榜 ...

  7. Trusted Cloud Summit(2018.08.14)

    时间:2018.08.14地点:北京国际会议中心

  8. (转)新手C#SQL语句的学习2018.08.13

    1.创建数据库(create) CREATE DATABASE database-name 2.删除数据库(drop) drop database dbname 3.备份数据库 --- 创建 备份数据 ...

  9. 新手C#SQLServer在程序里实现语句的学习2018.08.12

    从C#中连接到SQL Server数据库,再通过C#编程实现SQL数据库的增删改查. ado.net提供了丰富的数据库操作,这些操作可以分为三个步骤: 第一,使用SqlConnection对象连接数据 ...

随机推荐

  1. C# Why does '+' + a short convert to 44

    I have a line of code that looks like this: MyObject.PhoneNumber = '+' + ThePhonePrefix + TheBizNumb ...

  2. The Most Simple Introduction to Hypothesis Testing

    https://www.youtube.com/watch?v=UApFKiK4Hi8

  3. Tests for Variances

    In each case, we'll illustrate how to perform the hypothesis tests of this lesson using summarized d ...

  4. linux shell脚本之-变量极速入门与进阶(1)

    1,如果创建shell脚本? 使用任意文本编辑软件,一般为vim,创建.sh结尾的文件,在文件的最开头用 #!/bin/bash 注明shell的类型 如: ghostwu@dev:~/linux/s ...

  5. ExtJS学习之MessageBox

    MessageBox为ExtJS中的消息对话框,包括alert  confirm prompt show四种. 1.index.html <!DOCTYPE html PUBLIC " ...

  6. 新浪微博POI点签到数据及可视化的初步成果

    目前仅对山东省区域进行了抓取,权限不够高,抓取的速度非常慢,所以导致效率比较低... 数据抓取采用调用微博开放平台API的方法,数据存储采用mysql,格点数据分辨率为30″,山东省的MBR范围内(包 ...

  7. 网络基础 Windows控制台下Ftp使用简介

    Windows控制台下Ftp使用简介 by:授客 QQ:1033553122 测试环境: ftp服务器所在主机ip:172.25.75.2 ftp用户目录:F:\ftp   C:\Users\laif ...

  8. loadrunner 场景设计-目标场景设计

    场景设计-目标场景设计 by:授客 QQ:1033553122 A.   概述 Goals Types for Goal-Oriented Scenarios 在以目标为向导的场景中,定义你想实现的测 ...

  9. [20170705]理解linux su命令.txt

    [20170705]理解linux su命令.txt --//我一般在维护时经常使用root用户登录,然后su - oracle 转到其他用户操作--//一般都加入 - 参数.这个已经成了条件反射.. ...

  10. 前端限制input输入框(只能输入正整数)

    <input onkeyup="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{th ...