Nepali DateNepali DateBikram Sambat Date Engine
Methods

Packagistdate->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

use NepaliDateLibrary\NepaliDate;

Signature

public function getSeconds(): int;

Parameters

  • None.

Return Value

  • Type: int
  • Range: 0 to 59
  • Description: Second integer between 0 and 59.

Example

use NepaliDateLibrary\NepaliDate;

$now = new NepaliDate();
echo "Current second: " . $now->getSeconds();

Advertisement

On this page