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

  • 相关阅读:
    000_linux之Ubuntu安装
    001_linux基础命令
    018_linux驱动之_阻塞和非阻塞
    019_linux驱动之_定时器的引入
    017_linux驱动之_信号量
    016_linux驱动之_原子操作
    python logging模块整理
    python sys与shutil模块
    python configparser模块
    python os模块
  • 原文地址:https://www.cnblogs.com/gdqx/p/10133428.html
Copyright © 2011-2022 走看看