Nepali DateNepali DateBikram Sambat Date Engine
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: 0 to 59

Example

import { NepaliDate } from "nepali-date-library";

const date = new NepaliDate();
console.log(date.getSeconds()); // e.g. 42

Advertisement

On this page