Methods
date.getMilliseconds()
Retrieve the millisecond component from zero to nine hundred ninety nine.
The getMilliseconds method returns the millisecond fraction of the current second as an integer from 0 to 999. It provides high resolution timing details for precision logging and event timestamping.
Import
import { NepaliDate } from "nepali-date-library";Signature
getMilliseconds(): number;Parameters
- None.
Return Value
- Type:
number - Range:
0to999
Example
import { NepaliDate } from "nepali-date-library";
const date = new NepaliDate();
console.log(date.getMilliseconds()); // e.g. 512Related
date.getSeconds(): Retrieve the second component.date.getTime(): Retrieve the full epoch timestamp.
Advertisement
date.getSeconds()
Retrieve the second component from zero to fifty nine for the current date instance.
date.getTime()
Retrieve the numeric timestamp in milliseconds since the Unix epoch.