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_ ...
随机推荐
- asp.net web api 权限验证的方法
思路:客户端使用header或者form讲验证信息传入api,在权限验证过滤中进行处理,代码示例: 定义过滤器 public class ApiFilter1 : System.Web.Http.Au ...
- superrvisor application config ini
1. zookeeper [program:zookeeper] environment = JAVA_HOME="/opt/jdk1.8.0_191" process_name= ...
- How to identify safari in Mac?
How to identify safari in Mac?in userAgent, find keywords below1) and: Macintosh, Mac OS X, AppleWeb ...
- mybatis入门篇:通过SqlSession.selectList进行数据查询
作为一个java菜鸟,早就从慕课网中学到一些基本的mybatis的用法,但是一直不成体系,懵懵懂懂,既然正式入了java这个坑,就打算好好学学,所以买了本<MyBatis从入门到精通>,在 ...
- text-transform CSS
text-transform 控制文本的大小写(只对英文起作用,对汉字无效) Example: <p class="p1">This is an HI Element ...
- [mysql,2018-02-28] bat安装、启动mysql,并创建数据库、表
@echo off f: cd F:\mysql-win32 @echo off&setlocal enabledelayedexpansion cd bin echo ###### 停止当前 ...
- Windows下文件加固
今天学到一种Windows下简单的文件加固方法,可以防止文件被(普通)删除. CMD找到要加固的文件. 例:C盘下有个 1516.txt 文本文件需要加固. 然后 copy 该文件.(注意:这里并非普 ...
- django之 基于queryset和双下划线的跨表查询
前面篇随笔写的是基于对象的跨表查询:对象.objects.filter(...) 对象.关联对象_set.all(...) -->反向 基于对象的跨表查询例如: book_obj= Book ...
- leetcode240
public class Solution { public bool SearchMatrix(int[,] matrix, int target) { , j = matrix.GetLength ...
- LeetCode OJ 102. Binary Tree Level Order Traversal
题目 Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to rig ...