pydicom.valuerep.DT¶
-
class
pydicom.valuerep.DT(val)¶ Store value for an element with VR ‘DT’ as
datetime.datetime.Note that the
datetime.datetimebase class is immutable.-
__init__(val)¶ Initialize self. See help(type(self)) for accurate signature.
Methods
__init__(val)Initialize self. astimezonetz -> convert to local time in new timezone tz combinedate, time -> datetime with same date and time fields ctimeReturn ctime() style string. dateReturn date object with same year, month and day. dstReturn self.tzinfo.dst(self). fromisocalendarint, int, int -> Construct a date from the ISO year, week number and weekday. fromisoformatstring -> datetime from datetime.isoformat() output fromordinalint -> date corresponding to a proleptic Gregorian ordinal. fromtimestamptimestamp[, tz] -> tz’s local time from POSIX timestamp. isocalendarReturn a 3-tuple containing ISO year, week number, and weekday. isoformat[sep] -> string in ISO 8601 format, YYYY-MM-DDT[HH[:MM[:SS[.mmm[uuu]]]]][+HH:MM]. isoweekdayReturn the day of the week represented by the date. nowReturns new datetime object representing current time local to tz. replaceReturn datetime with new specified fields. strftimeformat -> strftime() style string. strptimestring, format -> new datetime parsed from a string (like time.strptime()). timeReturn time object with same time but with tzinfo=None. timestampReturn POSIX timestamp as float. timetupleReturn time tuple, compatible with time.localtime(). timetzReturn time object with same time and tzinfo. todayCurrent date or datetime: same as self.__class__.fromtimestamp(time.time()). toordinalReturn proleptic Gregorian ordinal. tznameReturn self.tzinfo.tzname(self). utcfromtimestampConstruct a naive UTC datetime from a POSIX timestamp. utcnowReturn a new datetime representing UTC day and time. utcoffsetReturn self.tzinfo.utcoffset(self). utctimetupleReturn UTC time tuple, compatible with time.localtime(). weekdayReturn the day of the week represented by the date. Attributes
dayfoldhourmaxmicrosecondminminutemonthoriginal_stringresolutionsecondtzinfoyear-