Skip to content

DOC: improve Timestamp properties docstrings #50619

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 8, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 42 additions & 4 deletions pandas/_libs/tslibs/timestamps.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,16 @@ cdef class _Timestamp(ABCTimestamp):
@property
def is_month_start(self) -> bool:
"""
Return True if date is first day of month.
Return True if the date is the first day of the month.

Returns
-------
bool
True if the date is the first day of the month.

See Also
--------
Timestamp.is_month_end : Similar property indicating the last day of the month.

Examples
--------
Expand All @@ -596,7 +605,16 @@ cdef class _Timestamp(ABCTimestamp):
@property
def is_month_end(self) -> bool:
"""
Return True if date is last day of month.
Return True if the date is the last day of the month.

Returns
-------
bool
True if the date is the last day of the month.

See Also
--------
Timestamp.is_month_start : Similar property indicating month start.

Examples
--------
Expand All @@ -613,7 +631,17 @@ cdef class _Timestamp(ABCTimestamp):
@property
def is_quarter_start(self) -> bool:
"""
Return True if date is first day of the quarter.
Return True if the date is the first day of the quarter.

Returns
-------
bool
True if date is first day of the quarter.

See Also
--------
Timestamp.is_quarter_end : Similar property indicating the quarter end.
Timestamp.quarter : Return the quarter of the date.

Examples
--------
Expand All @@ -630,7 +658,17 @@ cdef class _Timestamp(ABCTimestamp):
@property
def is_quarter_end(self) -> bool:
"""
Return True if date is last day of the quarter.
Return True if the date is last day of the quarter.

Returns
-------
bool
True if date is last day of the quarter.

See Also
--------
Timestamp.is_quarter_start : Similar property indicating the quarter start.
Timestamp.quarter : Return the quarter of the date.

Examples
--------
Expand Down