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.date
base 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.
ctime
Return ctime() style string.
fromisocalendar
int, int, int -> Construct a date from the ISO year, week number and weekday.
fromisoformat
str -> Construct a date from the output of date.isoformat()
fromordinal
int -> date corresponding to a proleptic Gregorian ordinal.
fromtimestamp
()Create a date from a POSIX timestamp.
isocalendar
Return a 3-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.
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.
weekday
Return the day of the week represented by the date.
Attributes
day
max
min
month
resolution
year
-