pydicom.valuerep.DA¶
-
class
pydicom.valuerep.DA(val: Union[None, str, _DA, datetime.date])[source]¶ Store value for an element with VR DA as
datetime.date.Note that the
datetime.datebase class is immutable.-
__init__(val: Union[str, _DA, datetime.date]) → None[source]¶ Create a new DA element value.
Methods
__init__(val)Create a new DA element value.
ctimeReturn ctime() style string.
fromisocalendarint, int, int -> Construct a date from the ISO year, week number and weekday.
fromisoformatstr -> Construct a date from the output of date.isoformat()
fromordinalint -> date corresponding to a proleptic Gregorian ordinal.
fromtimestamp()Create a date from a POSIX timestamp.
isocalendarReturn a 3-tuple containing ISO year, week number, and weekday.
isoformatReturn string in ISO 8601 format, YYYY-MM-DD.
isoweekdayReturn the day of the week represented by the date.
replaceReturn date with new specified fields.
strftimeformat -> strftime() style string.
timetupleReturn time tuple, compatible with time.localtime().
todayCurrent date or datetime: same as self.__class__.fromtimestamp(time.time()).
toordinalReturn proleptic Gregorian ordinal.
weekdayReturn the day of the week represented by the date.
Attributes
daymaxminmonthresolutionyear-