zoukankan      html  css  js  c++  java
  • Date对象

    创建Date               new  Date()

    Date对象方法:

        get系列:

            getDate()            返回一个月中的某一天(1-31)

            getDay()         返回一周中的某一天(0-6)

            getFullYear()  返回四位数的年份

            getMonth()   返回月份(0-11       0是一月)

            getHours()   返回的是当前的小时(0-23)

            getMinutes()  返回的是当前的分钟(0-59)

            getSeconds()   返回的是当前的秒(0-59)

            getTime()    返回的是1970年1月1日至今的毫秒数

        set系列:

            parse()    返回1970年1月1日到指定日期的毫秒数

            setDate()   设置一月的某一天(1-31)

            setFullYear()  设置年份

            setMonth()     设置月份(0-11)

            setHours()    设置小时(0-23)

            setMinutes()   设置分钟(0-59)

            setSeconds()  设置秒数(0-59)

            setTime      以毫秒数设置Date

  • 相关阅读:
    web性能优化
    比 git log 更强大的 git reflog
    父组件调用子组件的方法
    react-loadable 进行代码分割的基本使用
    create-react-app 使用 webpack 打包压缩失败
    mysql安装问题
    php 二维数组排序
    php 文件缓存 include vs serialize vs json_encode
    ab命令压力测试
    mysql使用的坑
  • 原文地址:https://www.cnblogs.com/wwwzhaocom/p/10154092.html
Copyright © 2011-2022 走看看