💾 Archived View for tris.fyi › pydoc › _strptime captured on 2023-04-26 at 13:25:07. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2023-01-29)
-=-=-=-=-=-=-
Strptime-related classes and functions. CLASSES: LocaleTime -- Discovers and stores locale-specific time information TimeRE -- Creates regexes for pattern matching a string of text containing time information FUNCTIONS: _getlang -- Figure out what language is being used for the locale strptime -- Calculates the time struct represented by the passed-in string
Stores and handles locale-specific information related to time. ATTRIBUTES: f_weekday -- full weekday names (7-item list) a_weekday -- abbreviated weekday names (7-item list) f_month -- full month names (13-item list; dummy value in [0], which is added by code) a_month -- abbreviated month names (13-item list, dummy value in [0], which is added by code) am_pm -- AM/PM representation (2-item list) LC_date_time -- format string for date/time representation (string) LC_date -- format string for date representation (string) LC_time -- format string for time representation (string) timezone -- daylight- and non-daylight-savings timezone representation (2-item list of sets) lang -- Language used by instance (2-item tuple)
Handle conversion from format directives to regexes.
clear(...) D.clear() -> None. Remove all items from D.
compile(self, format) Return a compiled re object for the format string.
copy(...) D.copy() -> a shallow copy of D
fromkeys(iterable, value=None, /) Create a new dictionary with keys from iterable and values set to value.
get(self, key, default=None, /) Return the value for key if key is in the dictionary, else default.
items(...) D.items() -> a set-like object providing a view on D's items
keys(...) D.keys() -> a set-like object providing a view on D's keys
pattern(self, format) Return regex pattern for the format string. Need to make sure that any characters that might be interpreted as regex syntax are escaped.
pop(...) D.pop(k[,d]) -> v, remove specified key and return the corresponding value. If the key is not found, return the default if given; otherwise, raise a KeyError.
popitem(self, /) Remove and return a (key, value) pair as a 2-tuple. Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.
setdefault(self, key, default=None, /) Insert key with a value of default if key is not in the dictionary. Return the value for key if key is in the dictionary, else default.
update(...) D.update([E, ]**F) -> None. Update D from dict/iterable E and F. If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
values(...) D.values() -> an object providing a view on D's values
date(year, month, day) --> date object
ctime(...) Return ctime() style string.
fromisocalendar(...) int, int, int -> Construct a date from the ISO year, week number and weekday. This is the inverse of the date.isocalendar() function
fromisoformat(...) str -> Construct a date from the output of date.isoformat()
fromordinal(...) int -> date corresponding to a proleptic Gregorian ordinal.
fromtimestamp(timestamp, /) Create a date from a POSIX timestamp. The timestamp is a number, e.g. created via time.time(), that is interpreted as local time.
isocalendar(...) Return a named tuple containing ISO year, week number, and weekday.
isoformat(...) Return string in ISO 8601 format, YYYY-MM-DD.
isoweekday(...) Return the day of the week represented by the date. Monday == 1 ... Sunday == 7
replace(...) Return date with new specified fields.
strftime(...) format -> strftime() style string.
timetuple(...) Return time tuple, compatible with time.localtime().
today(...) Current date or datetime: same as self.__class__.fromtimestamp(time.time()).
toordinal(...) Return proleptic Gregorian ordinal. January 1 of year 1 is day 1.
weekday(...) Return the day of the week represented by the date. Monday == 0 ... Sunday == 6
day = <attribute 'day' of 'datetime.date' objects>
max = datetime.date(9999, 12, 31)
min = datetime.date(1, 1, 1)
month = <attribute 'month' of 'datetime.date' objects>
resolution = datetime.timedelta(days=1)
year = <attribute 'year' of 'datetime.date' objects>
Difference between two datetime values. timedelta(days=0, seconds=0, microseconds=0, milliseconds=0, minutes=0, hours=0, weeks=0) All arguments are optional and default to 0. Arguments may be integers or floats, and may be positive or negative.
total_seconds(...) Total seconds in the duration.
days = <member 'days' of 'datetime.timedelta' objects> Number of days.
max = datetime.timedelta(days=999999999, seconds=86399, microseconds=999999)
microseconds = <member 'microseconds' of 'datetime.timedelta' objects> Number of microseconds (>= 0 and less than 1 second).
min = datetime.timedelta(days=-999999999)
resolution = datetime.timedelta(microseconds=1)
seconds = <member 'seconds' of 'datetime.timedelta' objects> Number of seconds (>= 0 and less than 1 day).
Fixed offset from UTC implementation of tzinfo.
dst(...) Return None.
fromutc(...) datetime in UTC -> datetime in local time.
tzname(...) If name is specified when timezone is created, returns the name. Otherwise returns offset as 'UTC(+|-)HH:MM'.
utcoffset(...) Return fixed offset.
max = datetime.timezone(datetime.timedelta(seconds=86340))
min = datetime.timezone(datetime.timedelta(days=-1, seconds=60))
utc = datetime.timezone.utc
compile(pattern, flags=0) Compile a regular expression pattern, returning a Pattern object.
escape(pattern) Escape special characters in a string.
IGNORECASE = re.IGNORECASE