woom.util.WoomDate#
- class woom.util.WoomDate(date, round=None)[source]#
Extended pandas Timestamp with custom formatting and time arithmetic
- Parameters:
- __init__()#
Attributes
Return numpy datetime64 format with same precision.
Return the day of the Timestamp.
Return day of the week.
Return the day of the year.
Return day of the week.
Return the day of the year.
Return the number of days in the month.
Return the number of days in the month.
Return the fold value of the Timestamp.
Return the hour of the Timestamp.
Return True if year is a leap year.
Check if the date is the last day of the month.
Check if the date is the first day of the month.
Check if date is last day of the quarter.
Check if the date is the first day of the quarter.
Return True if date is last day of the year.
Return True if date is first day of the year.
Return the microsecond of the Timestamp.
Return the minute of the Timestamp.
Return the month of the Timestamp.
Return the nanosecond of the Timestamp.
Return the quarter of the year for the Timestamp.
Return the second of the Timestamp.
Alias for tzinfo.
Returns the timezone info of the Timestamp.
The abbreviation associated with self._creso.
Return the value of the Timestamp.
Return the week number of the year.
Return the week number of the year.
Return the year of the Timestamp.
Methods
add(*args, **kwargs)Add time delta
as_unit(unit[, round_ok])Convert the underlying int64 representation to the given unit.
astimezone(tz)Convert timezone-aware Timestamp to another time zone.
ceil(freq[, ambiguous, nonexistent])Return a new Timestamp ceiled to this resolution.
combine(date, time)Combine a date and time into a single Timestamp object.
ctime()Return a ctime() style string representing the Timestamp.
date()Returns datetime.date with the same year, month, and day.
day_name([locale])Return the day name of the Timestamp with specified locale.
dst()Return the daylight saving time (DST) adjustment.
floor(freq[, ambiguous, nonexistent])Return a new Timestamp floored to this resolution.
int, int, int -> Construct a date from the ISO year, week number and weekday.
string -> datetime from a string in most ISO 8601 formats
fromordinal(ordinal[, tz])Construct a timestamp from a proleptic Gregorian ordinal.
fromtimestamp(ts[, tz])Create a Timestamp object from a POSIX timestamp.
Return a named tuple containing ISO year, week number, and weekday.
isoformat([sep, timespec])Return the time formatted according to ISO 8601.
Return the day of the week represented by the date.
month_name([locale])Return the month name of the Timestamp with specified locale.
Normalize Timestamp to midnight, preserving tz information.
now([tz])Return new Timestamp object representing current time local to tz.
re_match_since(string[, pos, endpos])Matches zero or more characters at the beginning of the string.
replace([year, month, day, hour, minute, ...])Implements datetime.replace, handles nanoseconds.
round(freq[, ambiguous, nonexistent])Round the Timestamp to the specified resolution.
strftime(format)Return a formatted string of the Timestamp.
strptime(date_string, format)Convert string argument to datetime.
time()Return time object with same time but with tzinfo=None.
Return POSIX timestamp as float.
Return time tuple, compatible with time.localtime().
timetz()Return time object with same time and tzinfo.
Return a NumPy datetime64 object with same precision.
Convert TimeStamp to a Julian Date.
to_numpy([dtype, copy])Convert the Timestamp to a NumPy datetime64.
to_period([freq])Return a period of which this timestamp is an observation.
to_pydatetime([warn])Convert a Timestamp object to a native Python datetime object.
today([tz])Return the current time in the local timezone.
Return proleptic Gregorian ordinal.
tz_convert(tz)Convert timezone-aware Timestamp to another time zone.
tz_localize(tz[, ambiguous, nonexistent])Localize the Timestamp to a timezone.
tzname()Return time zone name.
utcfromtimestamp(ts)Construct a timezone-aware UTC datetime from a POSIX timestamp.
utcnow()Return a new Timestamp representing UTC day and time.
Return utc offset.
Return UTC time tuple, compatible with time.localtime().
weekday()Return the day of the week represented by the date.