Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/zope/interface/common/__pycache__/idatetime.cpython-39.pyc
Ðазад
a i�h/R � @ s, d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ dd lm Z G d d� de�Z G dd � d e �ZG dd� de�ZG dd� de�Z G dd� de�ZG dd� de e�ZG dd� de�ZG dd� de�ZG dd� de�Ze ee� e ee � e ee� e ee� e ee� dS )z�Datetime interfaces. This module is called idatetime because if it were called datetime the import of the real datetime would fail. � )�date)�datetime)�time)� timedelta)�tzinfo)� Attribute)� Interface)�classImplementsc @ s( e Zd ZdZed�Zed�Zed�ZdS )�ITimeDeltaClassz�This is the timedelta class interface. This is symbolic; this module does **not** make `datetime.timedelta` provide this interface. z"The most negative timedelta objectz"The most positive timedelta objectz;The smallest difference between non-equal timedelta objectsN��__name__� __module__�__qualname__�__doc__r �min�max� resolution� r r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/zope/interface/common/idatetime.pyr s �r c @ s( e Zd ZdZed�Zed�Zed�ZdS )� ITimeDeltaa� Represent the difference between two datetime objects. Implemented by `datetime.timedelta`. Supported operators: - add, subtract timedelta - unary plus, minus, abs - compare to timedelta - multiply, divide by int/long In addition, `.datetime` supports subtraction of two `.datetime` objects returning a `.timedelta`, and addition or subtraction of a `.datetime` and a `.timedelta` giving a `.datetime`. Representation: (days, seconds, microseconds). z/Days between -999999999 and 999999999 inclusivez%Seconds between 0 and 86399 inclusivez+Microseconds between 0 and 999999 inclusiveN)r r r r r �days�seconds�microsecondsr r r r r + s r c @ s@ e Zd ZdZed�Zed�Zed�Zdd� Zdd� Z d d � Z dS )� IDateClassz�This is the date class interface. This is symbolic; this module does **not** make `datetime.date` provide this interface. zThe earliest representable datezThe latest representable datez6The smallest difference between non-equal date objectsc C s dS )zaReturn the current local time. This is equivalent to ``date.fromtimestamp(time.time())``Nr r r r r �todayS s zIDateClass.todayc C s dS )a� Return the local date from a POSIX timestamp (like time.time()) This may raise `ValueError`, if the timestamp is out of the range of values supported by the platform C ``localtime()`` function. It's common for this to be restricted to years from 1970 through 2038. Note that on non-POSIX systems that include leap seconds in their notion of a timestamp, leap seconds are ignored by `fromtimestamp`. Nr �� timestampr r r � fromtimestampX s zIDateClass.fromtimestampc C s dS )a Return the date corresponding to the proleptic Gregorian ordinal. January 1 of year 1 has ordinal 1. `ValueError` is raised unless 1 <= ordinal <= date.max.toordinal(). For any date *d*, ``date.fromordinal(d.toordinal()) == d``. Nr �Zordinalr r r �fromordinalb s zIDateClass.fromordinalN)r r r r r r r r r r r r r r r r E s � r c @ sx e Zd ZdZed�Zed�Zed�Zdd� Zdd� Z d d � Z dd� Zd d� Zdd� Z dd� Zdd� Zdd� Zdd� ZdS )�IDatez�Represents a date (year, month and day) in an idealized calendar. Implemented by `datetime.date`. Operators: __repr__, __str__ __cmp__, __hash__ __add__, __radd__, __sub__ (add/radd only with timedelta arg) z&Between MINYEAR and MAXYEAR inclusive.zBetween 1 and 12 inclusivezFBetween 1 and the number of days in the given month of the given year.c C s dS )a Return a date with the same value. Except for those members given new values by whichever keyword arguments are specified. For example, if ``d == date(2002, 12, 31)``, then ``d.replace(day=26) == date(2000, 12, 26)``. Nr )�year�month�dayr r r �replace� s z IDate.replacec C s dS )a8 Return a 9-element tuple of the form returned by `time.localtime`. The hours, minutes and seconds are 0, and the DST flag is -1. ``d.timetuple()`` is equivalent to ``(d.year, d.month, d.day, 0, 0, 0, d.weekday(), d.toordinal() - date(d.year, 1, 1).toordinal() + 1, -1)`` Nr r r r r � timetuple� s zIDate.timetuplec C s dS )z�Return the proleptic Gregorian ordinal of the date January 1 of year 1 has ordinal 1. For any date object *d*, ``date.fromordinal(d.toordinal()) == d``. Nr r r r r � toordinal� s zIDate.toordinalc C s dS )z�Return the day of the week as an integer. Monday is 0 and Sunday is 6. For example, ``date(2002, 12, 4).weekday() == 2``, a Wednesday. .. seealso:: `isoweekday`. Nr r r r r �weekday� s z IDate.weekdayc C s dS )z�Return the day of the week as an integer. Monday is 1 and Sunday is 7. For example, date(2002, 12, 4).isoweekday() == 3, a Wednesday. .. seealso:: `weekday`, `isocalendar`. Nr r r r r � isoweekday� s zIDate.isoweekdayc C s dS )am Return a 3-tuple, (ISO year, ISO week number, ISO weekday). The ISO calendar is a widely used variant of the Gregorian calendar. See http://www.phys.uu.nl/~vgent/calendar/isocalendar.htm for a good explanation. The ISO year consists of 52 or 53 full weeks, and where a week starts on a Monday and ends on a Sunday. The first week of an ISO year is the first (Gregorian) calendar week of a year containing a Thursday. This is called week number 1, and the ISO year of that Thursday is the same as its Gregorian year. For example, 2004 begins on a Thursday, so the first week of ISO year 2004 begins on Monday, 29 Dec 2003 and ends on Sunday, 4 Jan 2004, so that ``date(2003, 12, 29).isocalendar() == (2004, 1, 1)`` and ``date(2004, 1, 4).isocalendar() == (2004, 1, 7)``. Nr r r r r �isocalendar� s zIDate.isocalendarc C s dS )z�Return a string representing the date in ISO 8601 format. This is 'YYYY-MM-DD'. For example, ``date(2002, 12, 4).isoformat() == '2002-12-04'``. Nr r r r r � isoformat� s zIDate.isoformatc C s dS )z>For a date *d*, ``str(d)`` is equivalent to ``d.isoformat()``.Nr r r r r �__str__� s z IDate.__str__c C s dS )ap Return a string representing the date. For example date(2002, 12, 4).ctime() == 'Wed Dec 4 00:00:00 2002'. d.ctime() is equivalent to time.ctime(time.mktime(d.timetuple())) on platforms where the native C ctime() function (which `time.ctime` invokes, but which date.ctime() does not invoke) conforms to the C standard. Nr r r r r �ctime� s zIDate.ctimec C s dS )z�Return a string representing the date. Controlled by an explicit format string. Format codes referring to hours, minutes or seconds will see 0 values. Nr ��formatr r r �strftime� s zIDate.strftimeN)r r r r r r! r"