Methods
date.getSeconds()
Retrieve the second component from zero to fifty nine for the current date instance.
The getSeconds 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
import { NepaliDate } from "nepali-date-library";Signature
getSeconds(): number;Parameters
- None.
Return Value
- Type:
number - Range:
0to59
Example
import { NepaliDate } from "nepali-date-library";
const date = new NepaliDate();
console.log(date.getSeconds()); // e.g. 42Related
date.getMinutes(): Retrieve the minute component.date.getMilliseconds(): Retrieve the millisecond component.
Advertisement
date.getMinutes()
Retrieve the minute component from zero to fifty nine for the current date instance.
date.getMilliseconds()
Retrieve the millisecond component from zero to nine hundred ninety nine.