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_ ...
随机推荐
- html/css/js-横向滚动条的实现
在前端UI设计时,网页的制作很麻烦,深有感悟!碰到太多的不懂,或是第一次见,就要去网上找资料!横向滚动条就是我遇到麻烦中其中的一个,其实也 很简单,只是在几次项目中都用到了这个横向滚动条所以就拿出来说 ...
- 可空类型(Nullable)
C# 单问号 ? 与 双问号 ?? ? : 单问号用于对 int,double,bool 等无法直接赋值为 null 的数据类型进行 null 的赋值,意思是这个数据类型是 NullAble 类型的. ...
- leetcode每日刷题计划-简单篇day2
今天数模比赛爆肝&操作系统大作业 脖子疼orz先把题过了保证flag不倒..个别细节回头看吧 Num 13 罗马数字转整数 Roman to Integer 一遍提交过,开始编译出了点问题 具 ...
- python至winreg模块
_winreg模块在python3中已经改名了 https://blog.csdn.net/zhangxiaoyang0/article/details/72236305?fps=1&loca ...
- Django之form模板的使用
form模块的简介与用处 1.form 是前后端交互的一种方式, form表单提交的一种,django中有一个模块是form他主要用处就过滤前端form提交的数据 1. forms 模块是处理前后台的 ...
- MySQL中IN子查询会导致无法使用索引
今天看到一个博客园的一篇关于MySQL的IN子查询优化的案例,一开始感觉有点半信半疑(如果是换做在SQL Server中,这种情况是绝对不可能的,后面会做一个简单的测试.)随后动手按照他说的做了一个表 ...
- jquery中的callbacks之我见
callbacks是jquery的核心之一. 语法如下: jQuery.Callbacks( flags ) flags 类型: String 一个用空格标记分隔的标志可选列表,用来改变回调列表中 ...
- php 获取数组深度的值
匿名函数(闭包) $val = array(); array_walk_recursive($array, function ($x) use (&$val) { $val[] = $x; } ...
- OpenStack 安装:基本环境准备
刚刚学完openstack,这几篇文章就算对过去课程的一个总结吧. 首先说说基本的结构:在一台Dell的workstation上面安装了VMware,在VMware上面安装两台CentOS,现在给每台 ...
- m_sequencer、p_sequencer
https://blog.csdn.net/zhajio/article/details/79608323 p - parent sequencer - 要处理的实际sequencer类型的句柄,这个 ...