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
use NepaliDateLibrary\NepaliDate;Signature
public function getMilliseconds(): int;Parameters
- None.
Return Value
- Type:
int - Range:
0to999 - Description: Millisecond integer between 0 and 999.
Example
use NepaliDateLibrary\NepaliDate;
$now = new NepaliDate();
echo "Milliseconds: " . $now->getMilliseconds();Related
date->getTime(): Retrieve epoch timestamp in milliseconds.date->getSeconds(): Retrieve second component.
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.