Helpers for datetime
.
proto.datetime_helpers.
DatetimeWithNanoseconds
[source]¶
Track nanosecond in addition to normal datetime attrs.
Nanosecond can be passed only as a keyword argument.
from_rfc3339
(stamp)[source]¶
Parse RFC3339-compliant timestamp, preserving nanoseconds.
Parameters: stamp (str) – RFC3339 stamp, with up to nanosecond precision Returns: an instance matching the timestamp string Return type:DatetimeWithNanoseconds
Raises: ValueError
– if stamp does not match the expected format
from_timestamp_pb
(stamp)[source]¶
Parse RFC3339-compliant timestamp, preserving nanoseconds.
Parameters: stamp (Timestamp
) – timestamp message Returns: an instance matching the timestamp message Return type: DatetimeWithNanoseconds
nanosecond
¶
nanosecond precision.
replace
(*args, **kw)[source]¶
Return a date with the same value, except for those parameters given new values by whichever keyword arguments are specified. For example, if d == date(2002, 12, 31), then d.replace(day=26) == date(2002, 12, 26). NOTE: nanosecond and microsecond are mutually exclusive arguments.
rfc3339
()[source]¶
Return an RFC3339-compliant timestamp.
Returns: Timestamp string according to RFC3339 spec. Return type: (str)timestamp_pb
()[source]¶
Return a timestamp message.
Returns: Timestamp message Return type: (Timestamp
)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4