python模块:datetime
# Stubs for datetime # NOTE: These are incomplete!
import sys
from typing import Optional, SupportsAbs, Tuple, overload MINYEAR = 0
MAXYEAR = 0 TimeTuple = Tuple[int, int, int, int, int, int, int, int, int] class tzinfo:
def tzname(self, dt: Optional[datetime]) -> str: ...
def utcoffset(self, dt: Optional[datetime]) -> Optional[timedelta]: ...
def dst(self, dt: Optional[datetime]) -> Optional[timedelta]: ...
def fromutc(self, dt: datetime) -> datetime: ... class timezone(tzinfo):
utc = ... # type: timezone
min = ... # type: timezone
max = ... # type: timezone def __init__(self, offset: timedelta, name: str = ...) -> None: ...
def __hash__(self) -> int: ... _tzinfo = tzinfo
_timezone = timezone class date:
min = ... # type: date
max = ... # type: date
resolution = ... # type: timedelta def __init__(self, year: int, month: int, day: int) -> None: ... @classmethod
def fromtimestamp(cls, t: float) -> date: ...
@classmethod
def today(cls) -> date: ...
@classmethod
def fromordinal(cls, n: int) -> date: ... @property
def year(self) -> int: ...
@property
def month(self) -> int: ...
@property
def day(self) -> int: ... def ctime(self) -> str: ...
def strftime(self, fmt: str) -> str: ...
def __format__(self, fmt: str) -> str: ...
def isoformat(self) -> str: ...
def timetuple(self) -> tuple: ... # TODO return type
def toordinal(self) -> int: ...
def replace(self, year: int = ..., month: int = ..., day: int = ...) -> date: ...
def __le__(self, other: date) -> bool: ...
def __lt__(self, other: date) -> bool: ...
def __ge__(self, other: date) -> bool: ...
def __gt__(self, other: date) -> bool: ...
def __add__(self, other: timedelta) -> date: ...
@overload
def __sub__(self, other: timedelta) -> date: ...
@overload
def __sub__(self, other: date) -> timedelta: ...
def __hash__(self) -> int: ...
def weekday(self) -> int: ...
def isoweekday(self) -> int: ...
def isocalendar(self) -> Tuple[int, int, int]: ... class time:
min = ... # type: time
max = ... # type: time
resolution = ... # type: timedelta def __init__(self, hour: int = ..., minute: int = ..., second: int = ..., microsecond: int = ...,
tzinfo: Optional[tzinfo] = ...) -> None: ... @property
def hour(self) -> int: ...
@property
def minute(self) -> int: ...
@property
def second(self) -> int: ...
@property
def microsecond(self) -> int: ...
@property
def tzinfo(self) -> Optional[_tzinfo]: ... def __le__(self, other: time) -> bool: ...
def __lt__(self, other: time) -> bool: ...
def __ge__(self, other: time) -> bool: ...
def __gt__(self, other: time) -> bool: ...
def __hash__(self) -> int: ...
def isoformat(self) -> str: ...
def strftime(self, fmt: str) -> str: ...
def __format__(self, fmt: str) -> str: ...
def utcoffset(self) -> Optional[timedelta]: ...
def tzname(self) -> Optional[str]: ...
def dst(self) -> Optional[int]: ...
def replace(self, hour: int = ..., minute: int = ..., second: int = ...,
microsecond: int = ..., tzinfo: Optional[_tzinfo] = None) -> time: ... _date = date
_time = time class timedelta(SupportsAbs[timedelta]):
min = ... # type: timedelta
max = ... # type: timedelta
resolution = ... # type: timedelta def __init__(self, days: float = ..., seconds: float = ..., microseconds: float = ...,
milliseconds: float = ..., minutes: float = ..., hours: float = ...,
weeks: float = ...) -> None: ... @property
def days(self) -> int: ...
@property
def seconds(self) -> int: ...
@property
def microseconds(self) -> int: ... def total_seconds(self) -> float: ...
def __add__(self, other: timedelta) -> timedelta: ...
def __radd__(self, other: timedelta) -> timedelta: ...
def __sub__(self, other: timedelta) -> timedelta: ...
def __rsub(self, other: timedelta) -> timedelta: ...
def __neg__(self) -> timedelta: ...
def __pos__(self) -> timedelta: ...
def __abs__(self) -> timedelta: ...
def __mul__(self, other: float) -> timedelta: ...
def __rmul__(self, other: float) -> timedelta: ...
@overload
def __floordiv__(self, other: timedelta) -> int: ...
@overload
def __floordiv__(self, other: int) -> timedelta: ...
@overload
def __truediv__(self, other: timedelta) -> float: ...
@overload
def __truediv__(self, other: float) -> timedelta: ...
def __mod__(self, other: timedelta) -> timedelta: ...
def __divmod__(self, other: timedelta) -> Tuple[int, timedelta]: ...
def __le__(self, other: timedelta) -> bool: ...
def __lt__(self, other: timedelta) -> bool: ...
def __ge__(self, other: timedelta) -> bool: ...
def __gt__(self, other: timedelta) -> bool: ...
def __hash__(self) -> int: ... class datetime:
# TODO: Is a subclass of date, but this would make some types incompatible.
min = ... # type: datetime
max = ... # type: datetime
resolution = ... # type: timedelta def __init__(self, year: int, month: int = ..., day: int = ..., hour: int = ...,
minute: int = ..., second: int = ..., microsecond: int = ...,
tzinfo: Optional[tzinfo] = ...) -> None: ... @property
def year(self) -> int: ...
@property
def month(self) -> int: ...
@property
def day(self) -> int: ...
@property
def hour(self) -> int: ...
@property
def minute(self) -> int: ...
@property
def second(self) -> int: ...
@property
def microsecond(self) -> int: ...
@property
def tzinfo(self) -> Optional[_tzinfo]: ... @classmethod
def fromtimestamp(cls, t: float, tz: Optional[_tzinfo] = ...) -> datetime: ...
@classmethod
def utcfromtimestamp(cls, t: float) -> datetime: ...
@classmethod
def today(cls) -> datetime: ...
@classmethod
def fromordinal(cls, n: int) -> datetime: ...
@classmethod
def now(cls, tz: Optional[_tzinfo] = ...) -> datetime: ...
@classmethod
def utcnow(cls) -> datetime: ...
@classmethod
def combine(cls, date: date, time: time) -> datetime: ...
def strftime(self, fmt: str) -> str: ...
def __format__(self, fmt: str) -> str: ...
def toordinal(self) -> int: ...
def timetuple(self) -> TimeTuple: ... # TODO return type
def timestamp(self) -> float: ...
def utctimetuple(self) -> TimeTuple: ... # TODO return type
def date(self) -> _date: ...
def time(self) -> _time: ...
def timetz(self) -> _time: ...
def replace(self, year: int = ..., month: int = ..., day: int = ..., hour: int = ...,
minute: int = ..., second: int = ..., microsecond: int = ..., tzinfo:
Optional[_tzinfo] = None) -> datetime: ...
def astimezone(self, tz: Optional[_tzinfo] = ...) -> datetime: ...
def ctime(self) -> str: ...
if sys.version_info >= (3, 6):
def isoformat(self, sep: str = ..., timespec: str = ...) -> str: ...
else:
def isoformat(self, sep: str = ...) -> str: ...
@classmethod
def strptime(cls, date_string: str, format: str) -> datetime: ...
def utcoffset(self) -> Optional[timedelta]: ...
def tzname(self) -> Optional[str]: ...
def dst(self) -> Optional[int]: ...
def __le__(self, other: datetime) -> bool: ...
def __lt__(self, other: datetime) -> bool: ...
def __ge__(self, other: datetime) -> bool: ...
def __gt__(self, other: datetime) -> bool: ...
def __add__(self, other: timedelta) -> datetime: ...
@overload
def __sub__(self, other: datetime) -> timedelta: ...
@overload
def __sub__(self, other: timedelta) -> datetime: ...
def __hash__(self) -> int: ...
def weekday(self) -> int: ...
def isoweekday(self) -> int: ...
def isocalendar(self) -> Tuple[int, int, int]: ...
python:datetime
python模块:datetime的更多相关文章
- python模块——datetime
datetime模块是python自带对时间的操作,其常用的四大类分别是date.time.datetime.timedelta.下面分别讲解下这四大类中常用的方法及其属性. date类 date类的 ...
- 潭州课堂25班:Ph201805201 python 模块 datetime,logging 第七课 (课堂笔记)
datetime 模块 # -*- coding: utf-8 -*-# 斌彬电脑# @Time : 2018/7/9 0009 20:42import datetime d = datetime.d ...
- python模块-datetime模块
上面一篇已经讲了time模块,再来学习datetime模块. datetime主要有datetime.timedelta.time.date这4个子模块. a.datetime常用的函数(dateti ...
- python模块datetime
1. 日期输出格式化 datetime => string import datetime now = datetime.datetime.now() now.strftime('%Y-%m-% ...
- python模块--datetime
datatime.date类 构造器 返回值类型 说明 (year, month, day) date 类方法/属性 .max date datetime.date(9999, 12, 3 ...
- Python模块学习系列
python模块-time python模块-datetime python模块-OS模块详解
- Python学习总结14:时间模块datetime & time & calendar (一)
Python中的常用于处理时间主要有3个模块datetime模块.time模块和calendar模块. 一.time模块 1. 在Python中表示时间的方式 1)时间戳(timestamp):通常来 ...
- python模块之time和datetime
33.python模块之time 1.>>> time.time() 1470900847.8458395 ==>时间戳,从1970年到现在. 2.> ...
- Python,datetime模块实例
Python的标准模块datetime模块,在我们的工作中应用非常频繁,下面对datetime中常用的方法进行了总结和测试:对每一个方法都使用了单元测试框架Unittest来配合测试. 主要的类型有: ...
- Python模块 - time,datetime,calendar
time模块 localtime 当前时间的struct_time形式 >>> time.localtime() time.struct_time(tm_year=2015, tm_ ...
随机推荐
- 长短记忆神经网络LSTM
转载: https://www.jianshu.com/p/dcec3f07d3b5 https://blog.csdn.net/dream_catcher_10/article/details/48 ...
- NodeJS学习之win10安装与sublime配置
Window 上安装Node.js Node.js安装包及源码下载地址为:https://nodejs.org/en/download/ 下载安装就行了,安装node会同时安装npm. sublime ...
- jquery如何实现当页面下拉到一定位置时,右下角出现回到顶部图标
渐进式返回顶部
- linux环境下载和安装scala
Linux下安装Scala和Windows下安装类似,步骤如下: 1.首先访问下载链接:http://www.scala-lang.org/download/默认这里下载的是Windows版本,这时点 ...
- http 文件上传协议图览
- Sql入门学习——基本语法函数
--------使用工具navicat 快捷键操作 --------基本操作DML &DDL --------运算比较 --------数据类型 --------常用函数 --------常用 ...
- sybase-sql语法-replace用法
1.去空格 update hyl_temp02 --去空格 set acc_nbr=replace(acc_nbr,' ',''); commit; 2.去回车 update hyl_temp02 - ...
- vue 未完待续
1. v-text:主要用来更新textContent,可以等同于JS的text属性. <span v-text="msg"></span> 这两者等价: ...
- php 二维数组按照某个键排序
$date = array_column($arr, 'run_date'); //上面得到的结果:array(0=>'2017-11-21',1=>'2017-11-20',3=> ...
- Linux LVM扩容和缩容
将原硬盘上的LVM分区/dev/mapper/RHEL-Data由原来的60G扩展到80G Step1:将LVData扩容+20G,如下图: [root@esc data]# lvextend -L ...