zoukankan      html  css  js  c++  java
  • js当前日期

    function CurentTime()
        { 
            var now = new Date();
           
            var year = now.getFullYear();       //年
            var month = now.getMonth() + 1;     //月
            var day = now.getDate();            //日
           
            var hh = now.getHours();            //时
            var mm = now.getMinutes();          //分
           
            var clock = year + "-";
           
            if(month < 10)
                clock += "0";
           
            clock += month + "-";
           
            if(day < 10)
                clock += "0";
               
            clock += day + " ";
           
            if(hh < 10)
                clock += "0";
               
            clock += hh + ":";
            if (mm < 10) clock += '0'; 
            clock += mm; 
            return(clock); 
        }
     

  • 相关阅读:
    bzoj 3196/tyvj p1730 二逼平衡树
    AW201 可见的点 (欧拉函数)
    P3912 素数个数
    P1029 最大公约数和最小公倍数问题
    P1835 素数密度
    P2563 [AHOI2001]质数和分解
    P1075 质因数分解
    AW199 余数之和
    AW198 反素数
    AW197 阶乘分解
  • 原文地址:https://www.cnblogs.com/wcLT/p/4807284.html
Copyright © 2011-2022 走看看