Methods
date.get_seconds()
Retrieve the second component from zero to fifty nine for the current date instance.
The get_seconds method returns the second value as an integer from 0 to 59 for the current NepaliDate instance. It enables precise second level timing and formatting.
Import
from nepali_date_library import NepaliDateSignature
def get_seconds(self) -> int:Parameters
- None.
Return Value
- Type:
int - Range:
0to59 - Description: Second integer between 0 and 59.
Example
from nepali_date_library import NepaliDate
now = NepaliDate()
print(f"Current second: {now.get_seconds()}")Related
date.get_minutes(): Retrieve the minute component.date.get_milliseconds(): Retrieve milliseconds.
Advertisement
date.get_minutes()
Retrieve the minute component from zero to fifty nine for the current date instance.
date.get_milliseconds()
Retrieve the millisecond component from zero to nine hundred ninety nine.